RatedWithAI

RatedWithAI

Accessibility scanner

WCAG 2.1

2.5.3 Label in Name

Level A success criterion

The accessible name of UI components should contain the visible label text.

Why it matters

Voice control users rely on matching visible labels to activate controls.

Common violations

  • Buttons labeled visually as "Send" but named "Submit"
  • Icon buttons with mismatched aria-labels
  • Custom controls with hidden labels

Code examples

Bad

<button aria-label="Submit">Send</button>

Good

<button aria-label="Send">Send</button>

How to fix

Ensure aria-label or aria-labelledby includes the visible label text.

Related criteria

Related resources

Test & fix this criterion

Use these free tools and guides to check and fix 2.5.3 Label in Name violations:

Scan your site

Check your WCAG coverage in minutes

Start a free scan