Rule
Redundant aria-label
aria-label should not repeat the visible text.
- Rule
redundant-aria-label- Type
- Best practice, not a WCAG requirement. It runs when Best practices is switched on.
- Severity
- Minor
What it checks
The rule looks at elements with an aria-label whose role takes its name from its content, such as buttons, links, tabs, options and headings. It fails when the label matches the element's text exactly, ignoring case and spacing.
It passes when the element also holds content that would change the name, such as an image, an inline <svg>, hidden text, or ::before or ::after content, because there the label keeps the name clean. Landmarks and selects are not judged, since the text inside them is not their name. A matching label adds nothing for a screen reader user, and is easy to forget when the visible text changes.
Example
Fails
<button type="button" aria-label="Save">Save</button>
Passes
<button type="button" aria-label="Close">×</button>
The engine is tested against both examples.
How to fix it
Remove the aria-label and let the visible text name the element.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.