Accessibility

Alt text

Alt text is the written alternative for an image, read aloud by screen readers and shown by browsers when the image cannot be displayed.

WCAG 1.1.1 requires a text alternative for every image that carries meaning. A decorative image gets an empty alt attribute, so assistive technology skips it.

At a glance

Where it livesThe alt attribute on an <img> element
Required byWCAG 1.1.1 Non-text Content (Level A)
Informative imageA brief description of what the image shows, in the context of the page
Functional imageWhat the control does ("Search"), not what the icon looks like
Decorative imageAn empty attribute, alt="", so screen readers skip it
How often it is missingOn 53.1% of the top one million home pages (WebAIM Million, 2026)
Detected byOverlayQA Accessibility Audit

Why it matters

A screen reader user gets nothing from an image without alt text, and when the attribute is missing altogether some screen readers announce the file name instead (MDN). Browsers also show the alt text when the image fails to load, so it protects every visitor on a slow or blocked connection.

It is one of the most common accessibility failures on the web. WebAIM's 2026 scan of the top one million home pages found images with missing alt text on 53.1% of them: 16.2% of all images had no alt, 45% of those were links, and a further 10.8% of images with alt had text that was questionable or repeated nearby content (WebAIM Million, 2026).

How do you write good alt text?

The W3C's alt decision tree turns the choice into a few questions. Ask them in order.

Examples

ImageAlt textWhy
Product photo on a listingalt="Blue laptop backpack, front view"What a sighted shopper sees
Search icon inside the search buttonalt="Search"The action, not the drawing
Logo that links to the home pagealt="OverlayQA home"The destination
Flourish between two sectionsalt=""Decorative, so screen readers skip it
Bar chart of monthly sign-upsalt="Monthly sign-ups, January to June 2026", with the figures in the text belowA chart needs its data, not a picture of the bars

Common mistakes

Frequently asked questions

Is alt text required on every image?

Every image that carries meaning needs a text alternative under WCAG 1.1.1. A purely decorative image needs an empty alt attribute instead, so assistive technology ignores it. Leaving the attribute off entirely is wrong in both cases.

How long should alt text be?

WCAG sets no length. The W3C tutorial asks for a brief description of what the image conveys in context. If the image needs more, as a chart does, keep the alt short and put the detail in the page text.

What goes in the alt text of a linked image or an icon button?

The action or the destination: "Search", "Next page", "OverlayQA home". The W3C decision tree treats functional images separately from informative ones for exactly that reason.

What happens if the alt attribute is missing?

The page fails WCAG 1.1.1, and MDN notes that some screen readers announce the image file name instead, which is confusing when the file name says nothing about the picture.

Sources: WCAG 2.2, 1.1.1 Non-text Content, W3C WAI, An alt Decision Tree, WebAIM Million 2026, MDN, the img element.

Last updated October 22, 2026