You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is the aria-controls attribute that can be added to the select markup that will enhance the user experience for those using screen readers.
At a high level, aria-control programatically links the control (in this case the select box) to the section of the page that is modified based on the control.
Some screen readers do something with this (i.e. Jaws), but other screen readers just ignore the attribute (doesn't mean we shouldn't use - just that screen readers need to catch up).
How to add
The following is a code sample that can be referenced on how to add the aria-controls attribute to the project.
The aria-controls attribute contains the id of the section that gets updated when the select box changes.
Note: For extra awesomeness you can also add the aria-live="polite" attribute to the markup so that screen readers politely announce changes in content when the select box is changed.
The absence of the aria-controls attribute does not constitute a fail, so you are still WCAG compliant if it's missing.
If you Google it, there is some controversy around how valuable adding aria-controls is to markup, as only like 3 / 21 screen readers actually support aria-controls. The comment below from LJWatson below addresses the concern:
Description
There is the
aria-controls
attribute that can be added to theselect
markup that will enhance the user experience for those using screen readers.At a high level,
aria-control
programatically links the control (in this case theselect
box) to the section of the page that is modified based on the control.Some screen readers do something with this (i.e. Jaws), but other screen readers just ignore the attribute (doesn't mean we shouldn't use - just that screen readers need to catch up).
How to add
The following is a code sample that can be referenced on how to add the
aria-controls
attribute to the project.The
aria-controls
attribute contains theid
of the section that gets updated when theselect
box changes.Note: For extra awesomeness you can also add the
aria-live="polite"
attribute to the markup so that screen readers politely announce changes in content when the select box is changed.Sample code source
Notes
aria-controls
attribute does not constitute a fail, so you are still WCAG compliant if it's missing.aria-controls
is to markup, as only like 3 / 21 screen readers actually supportaria-controls
. The comment below from LJWatson below addresses the concern:Resources
Github issue on aria-controls
ARIA live regions documentation from Mozilla
The text was updated successfully, but these errors were encountered: