aria-roles-valid
role attribute must be a valid, non-abstract ARIA role
automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust
Checks that an explicit role="" attribute resolves to a real, non-abstract WAI-ARIA role.
Applies to. Applies to any element with a non-empty role="" attribute in the composed DOM.
Expectation. At least one role token names a concrete, non-abstract ARIA role. Graded by what the element falls back to when none does:
- FAIL on a roleless host (div, span, custom element), which is left exposed as generic, so the role the author meant reaches no one.
- CANTTELL where the element has a native role (a <button>, <nav>, <a href>), which the accessibility tree keeps using. ACT 674b10 lists 4.1.2 as a secondary requirement only, "satisfied through the implicit role," so the bad token is worth reporting but is not itself the criterion failing.
Examples
pass
<div role="button">Click</div>
"button" is a real, concrete ARIA role.
fail
<div role="buton"></div>
"buton" isn't a defined ARIA role token (typo).