4.1.2 Name, Role, Value
- Level A
- In WCAG 2.0, 2.1, 2.2
- 4. Robust › 4.1 Compatible
What WCAG says
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.
Quoted from W3C. More in W3C’s Understanding 4.1.2.
How to check it yourself
- With a screen reader, go to every custom control: menus, tabs, accordions, toggles, sliders.
- Does each say what it is (“button”, “tab”), its name, and its state (“expanded”, “selected”, “checked”), and announce changes?
Can an automated test check it?
Partly. Our scanner runs these 28 axe-core rules for 4.1.2 whenever your chosen WCAG version and level include it. They can prove some failures, but a pass doesn’t prove the page meets the criterion: a person still needs to do the checks above.
- Active <area> elements must have alternative text
area-alt - Elements must only use supported ARIA attributes
aria-allowed-attr - aria-braille attributes must have a non-braille equivalent
aria-braille-equivalent - ARIA commands must have an accessible name
aria-command-name - ARIA attributes must be used as specified for the element's role
aria-conditional-attr - Deprecated ARIA roles must not be used
aria-deprecated-role - aria-hidden="true" must not be present on the document body
aria-hidden-body - ARIA hidden element must not be focusable or contain focusable elements
aria-hidden-focus - ARIA input fields must have an accessible name
aria-input-field-name - Elements must only use permitted ARIA attributes
aria-prohibited-attr - Required ARIA attributes must be provided
aria-required-attr - ARIA roles used must conform to valid values
aria-roles - ARIA tab nodes must have an accessible name
aria-tab-name - ARIA toggle fields must have an accessible name
aria-toggle-field-name - ARIA tooltip nodes must have an accessible name
aria-tooltip-name - ARIA attributes must conform to valid values
aria-valid-attr-value - ARIA attributes must conform to valid names
aria-valid-attr - Buttons must have discernible text
button-name - IDs used in ARIA and labels must be unique
duplicate-id-aria - Frames must have a unique title attribute
frame-title-unique - Frames must have an accessible name
frame-title - Input buttons must have discernible text
input-button-name - Image buttons must have alternative text
input-image-alt - Form elements must have labels
label - Links must have discernible text
link-name - Interactive controls must not be nested
nested-interactive - Select element must have an accessible name
select-name - Summary elements must have discernible text
summary-name
Scan a web page to see which criteria it fails, or read how the checker works.