Welcome Check Web

Semantics · WCAG 2.1 Level A

Elements must have their visible text as part of their accessible name

Ensure that elements labelled through their content must have their visible text as part of their accessible name.

What it means

The label-content-name-mismatch rule flags elements that fail this check. It maps to WCAG success criterion 2.5.3.

Who it affects

Screen reader and voice control users who rely on visible labels matching the code.

How to fix it

The accessible name must contain the visible label text, so voice users can say what they see.

<button aria-label="Search the site">Search</button>

Check it on your site

Run a free scan. If this rule fails, the results list the affected elements. Deque, which maintains axe-core, also documents this rule in detail: Deque University: label-content-name-mismatch.

Quick answers

What does the axe rule "label-content-name-mismatch" check?

Ensure that elements labelled through their content must have their visible text as part of their accessible name.

How do I fix "Elements must have their visible text as part of their accessible name"?

The accessible name must contain the visible label text, so voice users can say what they see.

Who is affected by label-content-name-mismatch failures?

Screen reader and voice control users who rely on visible labels matching the code.

Automated accessibility scan. Results are informational and may not identify every accessibility issue. This service is not legal advice, a compliance certification, or a substitute for comprehensive manual accessibility testing.