Images & Alt Text
Informative, decorative, and complex images — the foundation of non-text content accessibility
Overview
Images are one of the most fundamental forms of non-text content on the web. For sighted users, images convey information instantly. For screen reader users, the alt attribute is the only way to understand what an image represents. Missing alt text causes screen readers to read the filename, while incorrect alt text on decorative images creates unnecessary noise.
WCAG Criteria:
- 1.1.1 Non-text Content — all non-text content must have a text alternative that serves the equivalent purpose
Key requirements:
- Every
<img>must have analtattribute — omitting it entirely causes screen readers to read the filename - Informative images need descriptive
alttext that conveys the same information as the image - Decorative images must use
alt=""(empty) so screen readers skip them entirely - Functional images (inside links or buttons) describe the purpose, not the appearance
- Complex images use
aria-describedbyto point to a longer visible description
Informative Image
Informative Image with Alt Text
A dog playing in the park.
View inaccessible code
<!-- No alt attribute at all — screen reader reads filename -->
<img src="dog-park.jpg" />
<p>A dog playing in the park.</p>A dog playing in the park.
View accessible code
<!-- Descriptive alt conveys the image content -->
<img src="dog-park.jpg" alt="A golden retriever catching a frisbee in a park" />
<p>A dog playing in the park.</p>What’s wrong without an alt attribute?
- The screen reader reads the image filename (e.g. “dog-park.jpg, image”) — meaningless noise
- This is different from
alt=""— a missing alt attribute is never correct - Users have no way to know what the image depicts
Predicted semantic summary (exact output varies):
| Version | Announcement |
|---|---|
Inaccessible (no alt) | “dog-park.jpg, image” (reads the filename) |
Accessible (alt text) | “A golden retriever catching a frisbee in a park, image” |
Decorative Image
Decorative Image Handling
Section Title
Content below the decorative divider.
View inaccessible code
<!-- alt="decorative border" adds noise — screen reader reads it aloud -->
<h3>Section Title</h3>
<img src="divider.png" alt="decorative border" />
<p>Content below the decorative divider.</p>Section Title
Content below the decorative divider.
View accessible code
<!-- alt="" tells screen readers to skip this image entirely -->
<h3>Section Title</h3>
<img src="divider.png" alt="" />
<p>Content below the decorative divider.</p>What’s wrong with alt text on decorative images?
- Screen readers announce “decorative border, image” — this adds no useful information
- Decorative images exist purely for visual styling and carry no meaning
- Using
alt=""(empty string) explicitly marks the image as decorative — the screen reader skips it completely - This is different from omitting
altentirely, which causes the filename to be read
Predicted semantic summary (exact output varies):
| Version | Announcement |
|---|---|
Inaccessible (alt="decorative border") | “decorative border, image” (unnecessary noise) |
Accessible (alt="") | (nothing — image is skipped entirely) |
Functional Image
Functional Image Inside a Link
View inaccessible code
<!-- Image inside a link with no alt — user hears just "link" -->
<a href="/search">
<img src="search-icon.svg" />
</a>What’s wrong without alt text on functional images?
- The link has no accessible name — the screen reader announces just “link” with no indication of where it goes
- Users cannot determine the purpose of the link without seeing the icon
- For functional images, the alt text should describe the purpose (e.g. “Search”), not the appearance (e.g. “magnifying glass icon”)
Predicted semantic summary (exact output varies):
| Version | Announcement |
|---|---|
Inaccessible (no alt) | “link” (no purpose conveyed) |
Accessible (alt="Search") | “Search, link” |
Beyond simple images
- Complex charts and diagrams: provide a concise
altthat identifies the image and its purpose, plus an adjacent or linked long description containing the data, relationships, and conclusion needed for the task. A data table may be the clearest equivalent for a chart. - Images of text: use real text whenever the same visual presentation can be achieved. Logos and essential presentations have limited exceptions under WCAG 1.4.5.
- CAPTCHAs: describe the non-text content’s purpose and provide alternatives for different sensory modalities. An audio transcription alone may create another perception or cognitive barrier; prefer verification that does not depend on solving a sensory puzzle.
- Testing: verify the computed name and the usefulness of the alternative in context. Exact spoken phrasing varies by screen reader and browser.