One or more elements that has a role="option" attribute, excluding option elements, not intentionally hidden in the DOM and available to assistive technologies, does not have an aria-selected attribute.
This rule is currently causing 287 accessibility errors in the doc site.
When the aria-selected attribute is not used or set to an invalid value the value of the options will not be communicated to users of assistive technology such as screen readers. When the currently selected item is not set to true and a screen reader encounters the listbox the current selection may not be communicated.
What to do
Authors need to set the element's aria-selected attribute to true or false. Currently, only a selected node is set to true.
Exit criteria
This issue can be closed when the error no longer appears in the LevelAccess testing tool. Please provide a screenshot of the local test with the new pull request.
Rule description
One or more elements that has a
role="option"
attribute, excluding option elements, not intentionally hidden in the DOM and available to assistive technologies, does not have an aria-selected attribute.This rule is currently causing 287 accessibility errors in the doc site.
WCAG Success criteria
4.1.2 Name, Role, Value - Level A
Why it matters
When the
aria-selected
attribute is not used or set to an invalid value the value of the options will not be communicated to users of assistive technology such as screen readers. When the currently selected item is not set totrue
and a screen reader encounters thelistbox
the current selection may not be communicated.What to do
Authors need to set the element's
aria-selected
attribute totrue
orfalse
. Currently, only a selected node is set totrue
.Exit criteria
This issue can be closed when the error no longer appears in the LevelAccess testing tool. Please provide a screenshot of the local test with the new pull request.