Ensure image alternative is not repeated as text
The image-redundant-alt
rule checks that alternative text (alt
attributes) for images inside links or buttons does not repeat nearby visible text. Redundant alt text can cause screen readers to announce the same information twice, which is unnecessary and potentially confusing.
What is being tested?
This rule ensures that:
- Images inside links or buttons do not have
alt
text that duplicates adjacent link or button text. - Image buttons have alt text that clearly describes the button’s action or purpose, not the image file or visual appearance.
Bad example
<p><a href="index.html"> <img src="images/home-icon.png" alt="Home Page" width="24" height="25"> Home Page </a></p>
In this example, the screen reader would announce “Home Page Home Page,” which is redundant. Instead, the image’s alt
attribute should be empty.
Good example
<p><a href="index.html"> <img src="images/home-icon.png" alt="" width="24" height="25"> Home Page </a></p>
Image button example
<input type="image" src="submit.png" name="submit" height="36" width="113" alt="Submit"> Submit
For image buttons, the alt
text serves as the button’s label and must describe the button’s action, not the image.
Why it matters
Redundant alternative text can confuse screen reader users by causing repeated announcements. Alt text should provide useful, non-duplicated information that communicates the image’s purpose or action. For image buttons, clear and concise alt text helps blind users understand what the button does.
Best practices
- Do not duplicate adjacent link or button text in the image’s
alt
attribute. - Use empty
alt=""
when an image is purely decorative or when the adjacent text already provides context. - For image buttons, make the
alt
describe the action (e.g., “Submit” or “Search”), not the image appearance or file name. - Avoid non-useful alt text like “chart,” “image,” “diagram,” or file names.
Other Rules
Interested in other web accessibility rules? Please see these other rules: