Required ARIA attributes must be provided
How to fix the aria-required-attr accessibility rule. ARIA.
What this rule checks
Ensure elements with ARIA roles have all required ARIA attributes
Who is affected
An ARIA role is missing an attribute it needs (e.g. a checkbox role without aria-checked), so its state isn't announced.
How to fix it
Add the required attribute and keep it updated with JavaScript.
Example
Before
<div role="checkbox">Subscribe</div>After
<div role="checkbox" aria-checked="false" tabindex="0">Subscribe</div>WCAG success criteria
When this rule fails, the page fails:
- 4.1.2 Name, Role, Value (Level A, WCAG 2.0, 2.1, 2.2)
Find it on your own page
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.
More detail
- Deque University’s reference for aria-required-attr (the makers of axe-core, the engine our scanner uses)
- All fix guides