Rule
Redundant image alt
Image alt should not repeat adjacent link or button text.
- Rule
redundant-image-alt- Type
- Best practice, not a WCAG requirement. It runs when Best practices is switched on.
- Severity
- Minor
What it checks
The rule looks at images inside links and buttons. It fails when the image's alt, or its title when it has no alt, is the same as the text the control already exposes. Text that is hidden from assistive technology is not counted.
When the image's alternative is the control's only name, it passes, since removing it would leave the control unnamed. A repeated alternative makes a screen reader say the control's name twice, such as "Home Home".
Example
Fails
<a href="/">
<img src="home-icon.png" alt="Home">
Home
</a>
Passes
<a href="/">
<img src="home-icon.png" alt="">
Home
</a>
The engine is tested against both examples.
How to fix it
Give the image alt="" so the visible text names the control on its own.
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.