2.5.3: Label in Name

What it means

For controls with visible text labels, the accessible name must include that visible text. Voice control users say what they see — if the spoken name differs, the control fails.

Icon-plus-text buttons must include the text in the name.

How to fix it

  • Ensure aria-label includes the same words shown on screen, or rely on visible text.
  • Do not replace visible “Search” with aria-label=“Go”.
  • Check speech control can activate buttons by their visible labels.
  • Align tooltip and aria-label text with visible button captions.

Quick examples

  • Good: A button shows “Add to cart” and its accessible name includes “Add to cart”.
  • Bad: Visible label “Submit order” but aria-label=“OK”.
  • Good: An icon beside the word “Print” does not override the visible label in the name.
  • Bad: Voice users cannot open “Menu” because the control is named “Navigation toggle icon”.

W3C Understanding 2.5.3: Label in Name — full official details