Skip to content

Plain guides to WCAG, alt text and screen readers

Contrast checker

Success criteria

WCAG 2.5.3 Label in Name: make the spoken name match the visible label

The accessible name of a control must contain the words people see on it.

  • Level A
  • WCAG 2.1
  • Operable
  • Checked 7 Nov 2026

WCAG 2.5.3 says that when a control shows a text label, its accessible name (the name software reads out or listens for) must contain those same words, ideally at the start, so a person using voice control can say what they see and have it work. If the button reads Send but the code calls it Submit form, saying "click Send" does nothing.

Quick facts

  • Level

    A
  • Added in

    WCAG 2.1
  • Principle

    Operable
  • Rule of thumb

    The name contains the visible text, and starts with it
  • Usual cause

    An aria-label that replaces the visible words with different ones
  • Helps most

    Voice control users, and screen reader users who can also see the screen

Who gets stuck when names and labels differ

Some people who can use neither a mouse nor a keyboard control a computer or phone by speech. They look at the screen and say the words on a control: "click Search", "tap Next". The software looks for a control whose accessible name matches. If the name is different, nothing happens, or the wrong control fires.

Screen reader users who have some sight meet the same mismatch from the other side: they hear one word and see another, and wonder whether they are on the right control. People with cognitive disabilities also benefit when the spoken and printed words agree.

What WCAG 2.5.3 asks for

It applies to user interface components with a label that includes text or images of text. That text has to appear inside the accessible name. W3C recommends going further and putting the visible text at the start of the name, because some voice software matches from the beginning.

  • Case and punctuation do not matter much: a label "Name *" and a name "Name, required" pass.
  • Extra words after the label are fine: "Read more" can be named "Read more about pricing".
  • Icons are not text labels, so an icon-only button is outside this rule. It still needs a name, which 4.1.2 requires.
  • Text near a control that is not acting as its label, such as a paragraph of instructions, does not count.

Label in name WCAG examples: pass or fail

Visible labelAccessible nameResultReason
SendSend messagePassContains the label, at the start
SendSubmit formFailThe visible word is missing
Read moreRead more about pricingPassLabel first, context after
Read morePricing detailsFailDifferent words
NextGo to next stepPass, but weakLabel is present but not first
EmailE-mail addressRiskySpelling differs, so speech may not match

Code: when aria-label hides the visible words

Most failures come from an aria-label added with good intentions. It replaces the button's own text in the accessibility tree.

Fails: users see Buy now but the name is Add this item to your basket.

<button aria-label="Add this item to your basket">
  Buy now
</button>

Passes: no aria-label, so the visible text is the name. Extra context sits in hidden text after it.

<button>
  Buy now<span class="visually-hidden">: Trail running shoes</span>
</button>

For form fields, a real label element tied to the input by for and id keeps the name and the visible label identical automatically. Our ARIA labels page explains when an aria-label is the right tool.

Testing for 2.5.3

  1. Pick the controls with visible words: buttons, links, tabs, menu items and form fields.
  2. Open the browser's accessibility inspector, select each one and compare its computed name with what is on screen.
  3. Flag any control whose name leaves out the visible words, changes their order or spells them differently.
  4. Turn on the voice control built into Windows, macOS, iOS or Android and try saying a few labels exactly as they appear.
  5. Check translated pages too: a translated button text with an untranslated aria-label is a frequent failure.

Automated checkers flag some WCAG label in name mismatches, mainly where an aria-label and the text content differ. They cannot judge labels that come from nearby text, so a manual pass is still needed.

Common causes and quick fixes

  • Name copied from a design spec. The aria-label says what the designer called the button, not what it says on screen. Delete it.
  • Marketing copy changed, code did not. The visible label was edited but the aria-label kept the old wording. Prefer no aria-label so there is only one place to edit.
  • aria-labelledby pointing at the wrong element. The name comes from a heading instead of the field's own label. Point it at the label, or add the label's id first in the list.
  • Placeholder used as a label. The visible hint and the hidden name drift apart. Use a real label.

Criteria that sit beside 2.5.3

This criterion builds on 4.1.2, which requires a name in the first place, and on 3.3.2, which requires visible labels on inputs. 2.4.6 asks that those labels describe their purpose, and the link purpose rule (2.4.4) often leads teams to add aria-labels to links, which is where 2.5.3 failures creep in. Read W3C's Understanding Label in Name for the intent, and tick it off in our WCAG checklist.

Questions people ask

What is label in name in WCAG?

Label in name is criterion 2.5.3, added in WCAG 2.1 at Level A. It requires that a control's accessible name contains the text shown on its visible label.

Does the accessible name have to match the visible label exactly?

No. The visible words have to be inside the name, and extra words may follow. Best practice is to start the name with the visible text.

Does 2.5.3 apply to icon-only buttons?

No, because an icon is not a text label. The button still needs a sensible accessible name under 4.1.2, and if it has a tooltip with text, matching that text helps voice users.

Can aria-label break wcag 2.5.3?

Yes, that is the most common cause. An aria-label replaces the visible text as the name, so if its words differ from the label, the control fails.

Is 2.5.3 WCAG Level A?

Yes. It is a Level A criterion, so every target from 2.1 onward includes it, AA included.