4.1.2 Name, Role, Value
Official description of the success criterion
For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.
What to do?
Ensure that user interface components have clear names, roles, and states.
Why is it important?
Supports assistive technologies in communicating content and functionality accurately.
Common pitfalls
Using HTML elements incorrectly and not providing an ARIA role for them.
How to test for it?
Automated tools can catch some of the problems with this criterion.
How to take this criterion into account in design?
Design visible labels for elements so the developer can avoid using ARIA attributes for the name information. Visible labels help all users while ARIA attributes help only screen reader users.
How to take this criterion into account in development?
Many errors that arise for this criterion as well as criterion 1.3.1 can be fixed by using visible and correctly created labels (<label>
).