Duplicate alt text
Silktide finds linked images whose alternative text repeats the text right next to them. When an image and its neighbouring text say the same thing, people using a screen reader hear the same words twice.
<!-- Problem: announced as "Apple Apple" -->
<a href="\/apple">
<img src="apple.png" alt="Apple">
Apple
</a>
<!-- Fixed: empty alt, the text alone names the link -->
<a href="\/apple">
<img src="apple.png" alt="">
Apple
</a>
Why this matters
exists to replace an image for people who cannot see it. When the identical words already appear beside the image, the alt text adds nothing - a announces "Apple Apple", which sounds broken and slows listening for no benefit. Multiplied across a page of product cards or news teasers, the repetition becomes genuinely tiring.
An image whose meaning is fully carried by adjacent text is effectively , and should be marked as such.
How to fix it
- Give the image an empty
alt=""so skips it and reads only the adjacent text, as in the example above. - Alternatively, hide the image with
aria-hidden="true"- useful when your insists on populating thealtattribute. - If the image and text are two separate links to the same destination, combine them into one link first - see Adjacent links.
How Silktide tests this
- Find every image that sits inside a link.
- Read the image's assistive text: its
altattribute, or anaria-label. - Compare it with the visible text of the elements immediately before and after the image.
- Report the image when the two match exactly, ignoring case.
Troubleshooting
The matching text is not part of the link
The comparison looks at the image's immediate neighbours, which can include text just outside the link. The duplication is still real for a screen reader user moving through the page, so the same fixes apply.
The texts differ slightly
Only exact matches (ignoring case) are reported. Near-duplicates such as "Apple"
next to alt="Apple logo" pass this check, but consider whether the alt text is
still adding anything for a listener.