Decorative images: when alt text should be empty
If an image adds nothing that the text around it does not already say, give it an empty alt attribute so screen readers skip it.
The test
Ask: if this image vanished, would a person using a screen reader miss anything? If not, it is decorative. Examples: a divider line, a background texture, a spacer, an icon next to a text label that says the same thing.
What to put in the alt attribute
An empty one: alt="". This is different from leaving the attribute out. A missing attribute can make some screen readers read the filename aloud. An empty value tells them to skip the image.
Images that look decorative but are not
- A product photo, even if the product name is nearby: describe the color and view.
- A logo that links somewhere: the alt text names the destination or the company.
- A chart: summarize the finding and put the data in the page.
In a bulk run
AltSweep flags likely decorative images, such as very small, very thin, or spacer-named files, and proposes empty alt text for them without using a credit. It is a guess from the filename and size, so look through those rows.