aria-required-attr · WCAG 4.1.2 Name, Role, Value · Level AHow to fix the “aria-required-attr” accessibility issue
The axe-core aria-required-attr rule fails when an element with an ARIA role is missing an attribute that role requires — for example role="checkbox" without aria-checked. The control then exposes an incomplete state. WCAG 2.2 (4.1.2, Level A).
What axe-core checks
axe-core checks each ARIA role against its required attributes and fails any element missing one (e.g. role="slider" without aria-valuenow).
Which standard this maps to
| WCAG 2.2 | 4.1.2 Name, Role, Value (Level A) |
| EN 301 549 | 9.4.1.2 |
| BFSG / EAA | BFSG § 12 via EN 301 549 · EAA Annex I |
| Category | ARIA |
Why it matters
Custom widgets (toggles, star ratings, tabs) built with ARIA roles but missing their required state attributes confuse assistive tech — the user cannot tell if a toggle is on or off. The fix is usually safer to avoid by using native HTML.
Common causes
role="checkbox"withoutaria-checkedrole="slider"withoutaria-valuenowrole="combobox"missingaria-expanded- Hand-rolled widgets copying a role without its state attributes
How to fix it
Add the required attributes for the role and keep them updated in JavaScript — or, better, use the native HTML element (e.g. <input type="checkbox">) which provides them for free.
<!-- Fails -->
<div role="checkbox">Subscribe</div>
<!-- Passes (native is best) -->
<input type="checkbox" id="sub"><label for="sub">Subscribe</label>
FAQ
It depends on the role; consult the ARIA spec. axe names the missing one in its report.
Prefer native HTML. ARIA roles add responsibility — you must manage all required states and keyboard behaviour yourself.
Find every issue like this on your site
Run a free WCAG 2.2 AA scan — real axe-core engine, no signup. Or get a timestamped evidence report for €29.