Skip to content
easeweb
Search topics

Decorative images read out as file names or repeated text

A workshop page has leaf dividers with no alt, so their file names are read, and a card photo whose alt repeats its link text takes an extra Tab stop.

WCAG 2.2
SC 1.1.1A
Required by
Section 508 · EN 301 549 (EU)
Broken alt="Glazing mugs" tabindex="0"
The accessibility problem illustrated: A file name, the title twice, a stray Tab stop.
01

The problem

Screen reader users hear file names and the same title twice, and keyboard users stop on a photo that does nothing.

02

Try it

Read the page from the top, then press Tab through the workshop card.

The panel shows both: what is read from the top, and what is said at each Tab stop. Listen for the divider, count the stops on the card.

Broken Can you fix this?

Reading from the top, a screen reader says:

  1. Workshops, heading
  2. divider-leaf.png, image
  3. link, Glazing mugs, image, Glazing mugs, Saturday 14 November, 10:00

Pressing Tab, it says at each stop:

  1. link, Glazing mugs, image, Glazing mugs, Saturday 14 November, 10:00
  2. Glazing mugs, image

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give images that add nothing an empty alt, or draw them with CSS, and never put them in the tab order.

  1. 1An image that adds nothing beside its text gets alt="", never a missing alt or a word like “divider”.
  2. 2Ornaments can be an img with alt="" or drawn with CSS; either way, nothing is read.
  3. 3No silent image has a tabindex, or is the only content of a link.
Before Ornaments with no alt and a photo that repeats its link
<h2>Workshops</h2><img src="/images/divider-leaf.png" class="divider"> <a class="card" href="/workshops/glazing">  <img src="/images/glazing.jpg" alt="Glazing mugs" tabindex="0">  <h3>Glazing mugs</h3>  <p>Saturday 14 November, 10:00</p></a>
After

An empty alt on every image that adds nothing

<h2>Workshops</h2><img src="/images/divider-leaf.png" class="divider" alt=""> <a class="card" href="/workshops/glazing">  <img src="/images/glazing.jpg" alt="">  <h3>Glazing mugs</h3>  <p>Saturday 14 November, 10:00</p></a>

Why this fix: Use native HTML first

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

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 the theme, the card component or the image fields change.

Limits

This is a starting pattern, not a guarantee for every application. Paths and class names in the snippets are placeholders. Whether an image is decoration depends on the page around it, so only a person who knows both can decide; keep that decision 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