Skip to content
easeweb
Search topics

AI alt text that misses or misreads what a photo shows

A shop's media library writes an AI description into each photo's alt text on upload and nobody reads it, so a planner in four colours is said to come in three.

WCAG 2.2
SC 1.1.1A
Required by
Section 508 · EN 301 549 (EU)
Broken photo.alt = await describeImage(photo.url);
The accessibility problem illustrated: No vision:Which colours can I buy?
01

The problem

Screen reader users hear what an AI guessed from each product photo, so they miss what the photo is there to show, or are told something that isn't true.

02

Try it

Upload the planner’s photos and see what goes into their alt text.

The panel under the editor shows what the AI wrote into each photo’s alt text. Can you read or change it in the editor? Then apply the fix: correct each description against its photo before you tick its box.

Broken Can you fix this?

BrokenThe AI's description written into the alt text on upload

Weekly planner 2027, A5

Photos

In each photo’s alt text, which a screen reader reads on the product page:

(Upload the photos)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Have a person check each AI description before it goes live.

Before
BrokenThe AI's description written into the alt text on upload
// When a photo is uploaded to the media librarymedia.on('upload', async (photo) => {  photo.alt = await describeImage(photo.url);  await photo.save();}); // When the editor's Publish button is pressedapp.post('/products/:id/publish', async (req, res) => {  const product = await products.get(req.params.id);  await product.publish();  res.redirect(product.url);});
What is wrong4 points
  • The upload handler writes the service's answer straight into the alt text, so it is published the moment the product is.
  • The editor shows the photos but never their descriptions, so nobody reads them before Publish.
  • The cover and inside photos are described by what is in them, without the year, the layout or the notes box.
  • The colours photo is described wrongly: three notebooks instead of four, and pink instead of terracotta.
After
FixAn AI draft that a person checks before it is published
// When a photo is uploaded to the media librarymedia.on('upload', async (photo) => {  // A draft for a person to check. The photo has no alt text until they have.  photo.altDraft = await describeImage(photo.url);  photo.alt = null;  await photo.save();}); // When the editor's Publish button is pressedapp.post('/products/:id/publish', async (req, res) => {  const product = await products.get(req.params.id);  for (const photo of product.photos) {    if (!req.body[`checked-${photo.id}`]) return res.sendStatus(422);    photo.alt = req.body[`alt-${photo.id}`].trim();    await photo.save();  }  await product.publish();  res.redirect(product.url);});
How it is fixed5 steps
  1. Save the service's answer as a draft in a field of its own, and set no alt text yet. Nothing the AI wrote can reach the page by itself.
  2. Show each draft in the editor, in a text box beside its photo, labelled with the question the description has to answer.
  3. Tie a short hint to the box saying the text is an AI draft to check against the photo.
  4. Add a required box to tick for each photo. The browser won't send the form until every photo has been checked, and the server refuses to publish without them too.
  5. On Publish, write what the person checked or rewrote into the alt text. An empty box they ticked becomes alt="", for a photo that adds nothing.

This fixes the Before and passes 1.1.1, as long as the person checking can see the photos and knows the product. The draft still saves typing; what makes it a text alternative is that someone who knows why the photo is on the page has read it.

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 after changing the description service, its settings or how photos are added.

How screen readers handle aria-describedby

Limits

This is a starting pattern, not a guarantee for every application. describeImage, media and products stand in for your own services. This guide covers generated descriptions published unread. An image with no alt, or a file name in it, is covered in missing alt text on images that carry information, and an upload that never asks for a description at all in image uploads that never ask for alt text. Charts and graphs need more than one sentence of alt text and have a topic of their own. Browsers that describe images with no alt text themselves, such as Microsoft Edge, are the reader's own tool, not the page's text alternative, and don't make an image without alt text pass. Test with the people who will buy from the page.

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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service