Almost, but not quite site front page
Almost, but not quite a guide to accessibility requirements
4 Robust

4.1.2 Name, Role, Value

Conformance level: A
Criterion released in WCAG version: 2.0

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.

You can get warnings like this: "This select element does not have a value/name available to an accessibility API." Now, what does this mean exactly?

  • Name: What this input is called, for example, what piece of information the user is providing.
    • Using aria-label helps only screen reader users. If you use a visible label, all users benefit from it.
  • Value: It means the current value of the input, so that users understand what they have chosen.
    • For HTML <select> , this means adding a selected attribute to an <option> element. If you have an "all" option, you can mark that option as selected when the page is first shown to the user.
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>).

More about this criterion elsewhere