Back to Info and Examples for Accessibility Insights for Web
aria-valid-attr
ARIA attributes must have valid names.
Why it matters
When an assistive technology encounters an element with an invalid ARIA attribute name, it might ignore the attribute or respond to it in an unexpected way. As a result, people who use assistive technologies might find the element difficult or impossible to use.
How to fix
Provide a valid name for each ARIA attribute:
- Make sure you are using the correct attribute name.
- Make sure the attribute name is spelled correctly.
For details about all ARIA attributes, see Accessible Rich Internet Applications (WAI-ARIA) 1.1: Definitions of States and Properties.
Example
Fail
<a tabindex="0" role="button" id="toggle" aria-on="true">Mute</a>
Pass
<a tabindex="0" role="button" id="toggle" aria-pressed="true">Mute</a>
About this rule
This rule passes if:
- ARIA attribute name is valid