AlaskaAirlines / auro-menu

Custom element that provides a list of options for the user to choose from
https://auro.alaskaair.com/components/auro/menu
Apache License 2.0
2 stars 3 forks source link

Element with role option is missing aria-selected attribute #187

Open blackfalcon opened 10 months ago

blackfalcon commented 10 months ago

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 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.