Skip to content

Missing alt text on images that carry information

A sale banner has its offer drawn into the picture with no alt, and the care icons under a product are all labelled “image”.

01

The problem

Screen reader users miss whatever an image tells, such as a sale or a safety warning.

02

Try it

Turn the images off and see what is left.

The panel shows what a screen reader reads. Can you still find the sale, its end date and the care advice?

Speckled mug

imageimageimage

A screen reader reads:

  1. kiln-sale.jpg, image
  2. Speckled mug, heading
  3. image, image
  4. image, image
  5. image, image

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give each image that tells something a text alternative: in its alt, or as real text beside an image marked alt="".

  1. 1Every img gets an alt: its message, or empty when the message is already in the text beside it.
  2. 2Write what the image tells here, not what it is: no file names, “image” or “icon”.
  3. 3Words in a picture go in its alt, or out of the picture into real text.
Before The message drawn into images with no useful alt
<section class="banner">  <img src="/images/kiln-sale.jpg"></section> <h1>Speckled mug</h1><div class="care">  <img src="/icons/dishwasher.png" alt="image">  <img src="/icons/microwave.png" alt="image">  <img src="/icons/no-oven.png" alt="image"></div>
After Write the message in the alt text
<section class="banner">  <img src="/images/kiln-sale.jpg"    alt="Kiln sale: 30% off all mugs until Sunday."></section> <h1>Speckled mug</h1><div class="care">  <img src="/icons/dishwasher.png" alt="Dishwasher safe">  <img src="/icons/microwave.png" alt="Microwave safe">  <img src="/icons/no-oven.png" alt="Not oven safe"></div>

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat whenever a banner, an icon set or the shared image component changes.

Limits

This is a starting pattern, not a guarantee for every application. Paths and class names in the snippets are placeholders. Whether an alt is right depends on the image and its context, and only a person who knows both can judge it, so keep alt text in your publishing review. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work