Linked image has no accessible name
Why it matters
When an image is the only content of a link and has no alt text, a screen reader announces just "link" or reads out the web address. Nobody knows where it goes.
How to fix it
Give the image alt text that says where the link goes, not what the picture looks like.
<!-- Before -->
<a href="/shop/"><img src="basket.svg"></a>
<!-- After -->
<a href="/shop/"><img src="basket.svg" alt="Visit the shop"></a> Read the W3C guidance: Understanding 2.4.4 Link Purpose (In Context).
Related rules
- Link has no text (WCAG 2.4.4)
- Link text is vague (WCAG 2.4.4)
- Same link text goes to different places (WCAG 2.4.4)
- Link to a file does not say what it is (WCAG 2.4.4)
Find this on your own site. A11yMate scans every page and lists where it happens. See pricing or browse all rules.