Visible text must be part of the element's accessible name

When a button or link shows text, its accessible name must contain that same text, ideally at the start. Speech recognition users can then activate it by saying what they see.

Rule IDlabel-content-name-mismatch
ImpactSerious
Success criterion 2.5.3 Label in Name · A
StandardsWCAG 2.1 · WCAG 2.2 · EN 301 549
Readabler fix Fixed automatically

Example

Before
<button aria-label="Submit booking request">Book now</button>

A voice control user says “click Book now” and nothing happens: the button is named “Submit booking request”.

After
<button aria-label="Book now: Riverside Hotel">Book now</button>

Saying “click Book now” works, and screen readers announce “Book now: Riverside Hotel, button”.

Why it matters

People with motor disabilities often use speech recognition, such as Dragon or the voice control built into macOS, iOS, Windows and Android. They activate a control by saying its visible text. If the accessible name says something different, the command fails, and they have to fall back to slow workarounds like numbered grids.

Screen reader users with some vision, and people who use text-to-speech for reading support, see one label and hear another. That mismatch is confusing and makes them doubt which control they are about to use.

This is a WCAG level A requirement, so it is part of every common accessibility standard.

How to fix it

The visible text is enough. Remove the aria-label and let the content name the element:

<button>Book now</button>

You need extra context. Keep the visible words, exactly and in the same order, at the start of the name:

<a href="/rooms/12" aria-label="Details: Deluxe double room">Details</a>

The extra information is a description, not a name. Move it to aria-describedby, which screen readers read after the name:

<button aria-describedby="pay-note">Pay now</button>
<p id="pay-note">You will be charged $240.</p>

You use aria-labelledby. Include the element's own id, so its visible text stays in the name:

<button id="buy" aria-labelledby="buy plan-pro">Choose</button>

Icon plus text. Hide the icon with aria-hidden="true" and let the text be the name.

Afterwards, test the control with your operating system's voice control: say “click” followed by the visible text and confirm it responds.

Checklist

  1. Remove aria-label when the visible text already names the control.
  2. Start every aria-label with the exact visible text.
  3. Put extra details in aria-describedby instead of the name.
  4. Test key controls with voice control by saying their labels.

How the check works

The check looks at widgets that take their name from content (buttons, links, menu items, tabs, checkboxes and similar) when they also have aria-label or aria-labelledby. It passes when the visible text, ignoring case and icon ligatures, appears as whole words inside the accessible name. It fails otherwise. When the text is not readable language, such as symbols or single letters, it asks for manual review.

Resources

Updated October 27, 2026