Sheath rule
a11y-no-unsupported-aria-properties
- Package
- Core
- Category
- Accessibility
- Default severity
- error by default
- Auto-fix
- Manual fix
#Why
User agents ignore non-global ARIA properties on roles that do not support
them. WAI-ARIA also explicitly prohibits naming properties on roles such as
generic, paragraph, code, and presentation.
#Examples
#Bad
<button aria-checked="true">Save</button>
<a href="/next" aria-selected="true">Next</a>
<div aria-label="Unnamed generic container"></div>
#Good
<button aria-pressed="true">Bold</button>
<div role="checkbox" aria-checked="true">Bold</div>
<a href="/next" aria-expanded="false">Next</a>
#Scope
The effective role comes from the first supported token in an explicit role fallback list or from statically known native HTML semantics. Common document, landmark, form, list, media, and table elements are included, along with conditional roles for links, images, inputs, selects, options, list items, and table descendants.
Dynamic roles, opaque attribute bags, ambiguous native semantics, ARIA 1.3 roles, and extension-module roles are not checked. Elements outside the accessibility tree are not checked either.
Supported and prohibited property relationships follow WAI-ARIA 1.2, including properties inherited from role superclasses.