Orofold Labs

Launching soon

Notes Get in touch

Performance and accessibility 4 min read Updated

Alternative text for three kinds of image

In short

Alternative text must serve the same purpose as the image, so informative images get a description, functional images describe their action, and decorative images get an empty value.

A screen reader user cannot see the picture, only what the page tells them about it. The alternative text therefore has to say what the image means on the page, as the W3C guidance requires. Find out what job the image does in its place on the page, and only then write the text. The same photograph may need different text in a product listing and in a news story.

The alternative must say the same thing

Success Criterion 1.1.1, Non-text Content, is Level A. It requires that all non-text content presented to the user has a text alternative that serves the equivalent purpose. The key phrase is equivalent purpose. The alternative does not have to describe every detail of the picture. It has to give the reader the same information or the same function that the image gives a sighted reader.

The W3C says the author decides the alternative, based on how and where the image is used. The same photograph can need a different alternative in a product listing and in a news story, because the job the image does is different in each place.

Each image belongs to one of three kinds

The W3C Images tutorial sorts images into three groups, and each needs a different treatment.

KindWhat the alternative holdsExample
InformativeA short description of the essential informationA photograph of a jacket in the colour the customer chose
FunctionalThe function of the link or button, not the pictureA printer icon that prints the page
DecorativeAn empty alternative, written as alt=""A divider or a background flourish that repeats no information

The tutorial describes a brief description as the minimum for an informative image. A complex image such as a graph needs its information presented elsewhere on the page as well, so that the reader does not depend on a very long alternative.

Working on something similar in your own product? A few honest sentences are enough – we read every enquiry and reply by email. Apply with your idea

Work through the decision order for each image

The W3C decision tree asks its questions in order, and you stop at the first answer that applies. Use it as a routine for each image, not as a replacement for judgement.

  1. If the image contains text, use an empty alternative when the same text appears nearby as real text, or is shown only for visual effect. If the text has a function, describe the function. If the text appears nowhere else on the page, include it in the alternative. If there is no text, go on.
  2. If the image is inside a link or button and its absence would make the purpose unclear, describe the destination or the action.
  3. If the image adds meaning to the page, give a brief description of that meaning. For a graph or complex information, include the information elsewhere on the page. If the image repeats nearby real text, use an empty alternative.
  4. If the image is purely decorative, or not intended for users, use an empty alternative.
  5. If none of these applies, read the full Images tutorial, because the tree does not cover every case.

Functional images describe the action

For an image inside a link or button, the alternative should say where the link goes or what the button does. The W3C says the alternative should describe the functionality of the link or button rather than the visual image. A magnifying-glass icon on a search button therefore needs an alternative such as “search”, because the user needs to know what happens when they activate it, not what the icon looks like.

The same logic applies to a logo that links to the home page. The alternative names the destination, such as the brand name, rather than describing the picture as a logo.

A checklist for alternative text

  1. Switch images off in the browser, or view the page in a text-only mode, and check that the page still makes sense.
  2. Read each alternative aloud and check that it gives the same information as the image it replaces.
  3. Look for images whose alternative repeats the caption or heading beside them, and mark them as empty.
  4. Check that every decorative image has an empty alternative, and that none has a missing one.
  5. Check that every image inside a link or button describes the destination or the action.

Image dimensions and file formats are a performance question, covered in responsive images. For testing the whole page, including with assistive technology, see How to test a service for accessibility.

The wording comes from the W3C pages for Success Criterion 1.1.1, the Images tutorial and its decision tree. The examples are illustrations, not rules for any particular product.

Sources and limits

Common questions

When should an image get an empty alternative?
The W3C uses an empty alternative, written as alt="", for decorative images, for images that repeat nearby real text, and for text shown only for visual effect.
Should an icon inside a button describe the picture?
Usually not. For an image inside a link or button, the W3C says the alternative should describe the function of the link or button rather than the visual image.
What should the alternative say about a graph?
The W3C decision tree says that for a graph or complex information, the information should be included elsewhere on the page.

Sources

  1. Understanding Success Criterion 1.1.1: Non-text Content, W3C (WCAG 2.2). Accessed 14 November 2026
  2. Images Tutorial, W3C Web Accessibility Initiative. Accessed 14 November 2026
  3. Images Decision Tree, W3C Web Accessibility Initiative. Accessed 14 November 2026

Further reading

Have an idea that should exist? Or a working product that needs more customers, a new website or a complete rework? Bring us anything. Apply with your idea

All notes