Accessibility finding
Alternative texts that are missing, are file names or placeholders, or are too long
Accessibility Error Severity: High
Part of the audit Alternative text quality. Finding id: accessibility.altTextQuality.
What it costs you
Screen reader users are told nothing about this image, or hear its file name. Search engines get no text for it either.
What to do
Write an alternative text that says what the image is for on this page; give decoration an empty alt. The scanner's guidance applies: [help url]
What it checks
- Image description missing
- Image description is a file name
- Image description too long
- Image description repeats nearby text
- Image link without a name
How to fix it
Give the image a text that serves its purpose
- If the alt comes from a media library field, correct it there, so every page that uses the image is fixed.
- If the caption already says everything, set alt to an empty string instead of repeating the caption.
How to check: Recrawl the pages: the image is no longer reported.
A real case
Blind customers sued Target in 2006 because its website could not be used with a screen reader; among other barriers, images had no alternative text. Target settled in 2008 with a 6 million dollar fund for claimants and agreed to fix the site.
Thresholds
| Name | Default | Meaning |
|---|---|---|
min_scanners | 2 | How many scanners must report a missing text alternative before it counts as a failure. |
max_alt_length | 150 | Alternative texts longer than this many characters are queued for review. |
filename_pattern | (?i)(\.(jpe?g|png|gif|webp|svg|avif|bmp)$|^(img|dsc|image|screenshot)[-_ ]?[0-9]+) | Regular expression for an alternative text that is a file name. |