|Some HTML elements are restricted in the role allowed based on the semantics of the element (e.g.
li elements can only have list related ARIA roles).
- ARIA role attributes change the exposed meaning (semantics) of HTML elements to assisitve technologies.
- When a role conflicts with the implicit semantics of an HTML element the accessibility API provides confusing and/or conflicting information to screen readers.
- Role restrictions make sure roles enhance rather than conflict with the implicit semantcs of an HTML element.
HTML4 Legacy Techniques
HTML5 and ARIA Techniques
|WCAG Success Criteria
4.1.2 Name, Role, Value (Level A, Primary Success Criterion)
- Some HTML elements do not allow any role to override of the implicit role, in this case the role must be removed.
- Some HTML elements only allow certain roles to override of the implicit role, in this case only the allowed roles can be used to override the implicit role.
- When the explict role is the same as the implicit role for an HTML element, the explict role should be removed to insure the native semantics of the element are properly represented in accessibility APIs.