• Success Criterion 2.4.4
  • Conformance level A
  • W3C reference F89

Image-Only Link or Button With No Accessible Name

2.4.4 — Link Purpose (In Context)

Scenario

Setting

A hotel booking site's room-selection page

What’s wrong

A link or button whose only content is an image has no accessible name — screen readers announce 'link' with no clue where it goes.

Example

<a href="/room/deluxe-king">
  <img src="deluxe-king-thumb.jpg">
</a>

Why it matters

A screen reader announces just link or the raw filename, giving no clue that this opens the Deluxe King room.

How to test

Check a link/button whose only content is an image: inspect its accessible name in DevTools — if empty or generic ('link', 'image'), it fails.

How to fix

When an image is the only content of a link, its alt text becomes the link's accessible name.

<a href="/room/deluxe-king">
  <img src="deluxe-king-thumb.jpg" alt="Deluxe King room details">
</a>

Outcome

A guest browsing by screen reader hears Deluxe King room details and opens the right room page.

Who is affected

Screen reader users browsing room photos can't tell which room each image link leads to.

Learn more