Elements must only use ARIA attributes their role supports
Each ARIA role accepts a defined set of states and properties. Use only attributes that the element's role supports, so assistive technology reports the state you intend.
| Rule ID | aria-allowed-attr |
|---|---|
| Impact | Critical |
| Success criterion | 4.1.2 Name, Role, Value · A |
| Standards | WCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549 |
| Fixed automatically |
Example
<a href="/sale" aria-checked="true">
Autumn sale
</a>A screen reader says “Autumn sale, link” and drops the selected state you meant to convey.
<a href="/sale" aria-current="page">
Autumn sale
</a>A screen reader says “Autumn sale, link, current page”.
Why it matters
Screen readers and voice control software build their picture of a page from roles and the ARIA states attached to them. When an attribute does not belong to the role, browsers usually drop it, so the information never reaches the user. Some combinations are worse: a screen reader may announce a state that makes no sense for the control, such as “checked” on a link, and confuse the listener.
Blind users and people who navigate by voice depend on these states to know whether a menu is open, a tab is selected or a link marks the current page. When the attribute is ignored, they act on wrong or missing information. Unsupported attributes also often reveal a deeper mistake: the wrong role, or a widget built from the wrong element.
How to fix it
First decide what the element really is, then pick an attribute that fits that role.
The attribute is right, the role is wrong. If a div toggles like a switch, give it the matching role so aria-checked becomes valid:
<div role="switch" aria-checked="false" tabindex="0">Email alerts</div>
A native control is better still:
<label><input type="checkbox" role="switch"> Email alerts</label>
The role is right, the attribute is wrong. Replace it with one the role supports. To mark the active page in a menu, use aria-current instead of aria-selected or aria-checked:
<a href="/orders" aria-current="page">My orders</a>
The attribute does nothing. Remove it. Global attributes such as aria-label, aria-describedby and aria-hidden work on most roles; role-specific ones such as aria-expanded, aria-pressed, aria-valuenow and aria-level do not.
Tree grid rows. aria-level, aria-expanded, aria-posinset and aria-setsize are only valid on rows inside a treegrid.
Checklist
- Confirm the element has the role its behaviour needs.
- Look up which states and properties that role supports.
- Replace mismatched attributes with supported ones, such as aria-current on links.
- Remove ARIA attributes that have no effect.
- Prefer native HTML controls, which expose states automatically.
How the check works
The check reads every ARIA attribute on each element and compares it with the attributes allowed for the element's role, including global attributes. It fails when an attribute is not supported for that role, is deprecated for it, or is not allowed on that particular HTML element. It does not judge whether the value is sensible, so test the widget with a screen reader too.
Resources
- Understanding 4.1.2 Name, Role, Value W3C
- W3C ACT rule 5c01ea W3C ACT
- Read me first: no ARIA is better than bad ARIA ARIA Authoring Practices Guide
- WAI-ARIA 1.2 specification W3C
Updated October 27, 2026