Skip to main content

Write good alt text for an image

General · All · Last updated

Part of training module 3: The ideas that apply everywhere: structure, text alternatives, colour

Alt text is a short written description of an image that a screen reader speaks, and good alt text carries the meaning the image adds to the page.

Steps

  1. Ask what the image is for. Does it show data, explain an idea, set a mood, or act as a button or link? If it adds nothing, treat it as decoration: see Decide whether an image is decorative.
  2. Read the text around the image. Do not repeat what the nearby sentences already say.
  3. Write what a reader would miss without the image. Name the key subject, the action and any words shown in the image.
  4. Keep it short. One or two sentences is usually enough. Leave out "image of" and "picture of".
  5. If the image is a chart, map or diagram with a lot of detail, write a short summary as alt text and put the full detail in the document: see Describe a chart or graph: alt text plus a data table.
  6. If the image contains text, include that text word for word in the alt text.
  7. If the image is a link or button, describe where it goes or what it does, not how it looks.
  8. Read your text aloud with the image hidden. If the page still makes sense, the alt text works.

Check it worked

  • Ask a colleague to read only the alt text and say what the image shows. Their answer should match your purpose.
  • Compare the alt text with the caption or nearby text. Nothing should be repeated word for word.
  • Use your app's accessibility checker to confirm no image is missing alt text. The checker cannot tell whether the words are any good, so a person must read them.

Common mistakes

  • Writing a file name or a vague word such as "graphic" or "photo". These tell the reader nothing.
  • Describing every visual detail. Describe only what matters for the purpose of the page.
  • Leaving automatic descriptions in place without reading them. They are often wrong or too general.
  • Using the same alt text for every image in a series. Each one needs its own purpose.

The same task in other applications

More for General