Rule: Label in name for controls

Rule ID Control 15
Conformance Required
Definition The labels (e.g. accessible name) for controls and widgets that include text or images of text, the name contains the text that is presented visually.
Purpose
  • Voice recognition users can directly activate controls on a page with fewer surprising changes of focus.
  • Screen reader users will have a better experience because the labels that they hear match the visible text labels that they see on the screen.
  • In general avoid using images and hidden text for defining accessible names whenever possible.
Conformance Required
WCAG Success Criteria

Success Criterion 2.5.3 Label in Name

Rule Category Forms
Rule Scope Element
Techniques
  • If images of text that are part of an accessible name (e.g. label), the alt text must be the same as the text of the image.
  • If aria-label is used as part of an accessible name (e.g. label), the aria-label contains the same text associated the visually rendered content associated with the control.
  • If a hidden aria-labelledby reference is used as part of the accessible name (e.g. label), verify the computed name of all the referenced contain has the same text associated the visually rendered label associated with the control.
  • Accessible names may contain additional information useful to people using assistive technologies, but should start with the visible text associated with the control.
Information Links