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.
| Kind | What the alternative holds | Example |
|---|---|---|
| Informative | A short description of the essential information | A photograph of a jacket in the colour the customer chose |
| Functional | The function of the link or button, not the picture | A printer icon that prints the page |
| Decorative | An 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.
- 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.
- If the image is inside a link or button and its absence would make the purpose unclear, describe the destination or the action.
- 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.
- If the image is purely decorative, or not intended for users, use an empty alternative.
- 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
- Switch images off in the browser, or view the page in a text-only mode, and check that the page still makes sense.
- Read each alternative aloud and check that it gives the same information as the image it replaces.
- Look for images whose alternative repeats the caption or heading beside them, and mark them as empty.
- Check that every decorative image has an empty alternative, and that none has a missing one.
- 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.
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
- Understanding Success Criterion 1.1.1: Non-text Content, W3C (WCAG 2.2). Accessed 14 November 2026
- Images Tutorial, W3C Web Accessibility Initiative. Accessed 14 November 2026
- Images Decision Tree, W3C Web Accessibility Initiative. Accessed 14 November 2026
Further reading
-
Speed as part of design: Core Web Vitals in practice
Speed is part of the design: visitors feel it in loading, responsiveness and layout stability, and the Core Web Vitals give a shared way to measure all three.
-
How to test a service for accessibility
Combine automated scans with manual checks, testing with assistive technology and testing with disabled users, starting in alpha.
-
Semantic HTML and why element choice matters
Choose each element for the meaning it gives content, because screen readers, keyboards and search engines all read the structure you write.
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