A screen reader user may encounter every image in a page’s reading order. Describing a decorative banner creates audio clutter; leaving a meaningful icon unnamed can hide information or an action. Alternative text gives non-text content an equivalent that fits its purpose, without making users listen to unnecessary detail. section 3.3
Choose the treatment by asking what the image does here:
- Decorative: use <img alt="">, or use a CSS background image when appropriate. Do not simply omit alt: some screen readers may announce the filename. For a decorative inline SVG, use aria-hidden="true". section 3.3.1
- Informative: write a short equivalent for the information the image adds, not an inventory of visual details. If surrounding text already supplies that information, the image may instead be decorative. section 3.3.2
- Functional: name the action or destination, rather than the pictured object. An image-only Search button can use <img alt="Search">; alternatively, label the button with aria-label="Search" and give its image alt="". Visible button text can supply the name without either. section 3.3.3
- Complex: give a concise alt value, then provide the full information in adjacent structured text or through a link. A long alt string cannot offer the headings, tables, navigation, or user control that a chart’s full explanation may need. section 3.3.4
- Interactive image map: describe the whole image’s purpose in its alt, and give each linked <area> its own meaningful alt text. section 3.3.5
A small icon, a different job
Beside a download link, a PDF icon can use alt="PDF File" to communicate the file type. There is no need to announce “Icon of a PDF document.” If the link text already says it is a PDF, consider making the icon decorative instead. section 3.3.2
<figure role="group"> #A
<img
src="poll.png"
alt="Pie chart of exit poll results. Full details presented below."> #B
<figcaption> #C
<h2>Exit poll results</h2>
<p>In the recent exit polls, we have observed the following outcomes...</p>
<h3>Sentiment towards leaders</h3>
<p>The following table presents….</p>
<table>
...
</table>
</figcaption>
</figure>
The poll-chart example pairs brief alt text with a nearby, structured description containing headings and a table. The short alternative points readers to the detail rather than squeezing it into one announcement. section 3.3.4
TIP: Test with a screen reader or inspect the accessibility tree to check that decorative images stay silent. Review generated alt text manually: an image description alone may miss the image’s purpose in context. For text-heavy graphics, prefer real text where possible; alt cannot preserve embedded headings and lists or make pictured text respond to font settings. section 3.3.1 section 4.4.4




