CalcSnippets
Web 3 min read

How to Write Accessible Image Alt Text

Write useful image alt text by explaining purpose, context, visible information, and action without repeating nearby content.

Write alt text after deciding what the image contributes. A product image may need its model or visible state; a chart may need the trend and the values that matter; a decorative shape may need no words. If the image contains complex information, provide a nearby text explanation rather than trying to put every detail into one short attribute. Do not start with """image of""" unless the type itself helps the reader. Check that nearby captions and headings do not repeat the same sentence. Review alt text when the image changes, when the page purpose changes, or when user feedback shows that the description is misleading.

Write for the image's purpose

Alt text is a short text alternative for people who cannot see an image or choose not to load it. The right wording depends on why the image is present. A product image may need the product, color, and important condition. A chart may need its conclusion or the data relationship. A decorative image may need empty alternative text so it does not interrupt reading.

Ask what a sighted reader would need to know to complete the page's task. Do not begin with """image of""" unless the image type matters. Avoid describing every visible detail when the surrounding text already explains the same thing. Use the nearby caption, heading, and link label as part of the context.

Keep meaning, not decoration

For a photograph, name people only when identity matters and permission is appropriate. Describe an action, setting, or relationship when it supports the story. Avoid guessing emotions, motives, or facts that the image cannot prove. If a photograph contains sensitive information, consider whether the page should display it at all.

Charts and diagrams need special care. A short alt text can state the main trend, while a longer description or data table can provide exact values. Do not make color the only way to distinguish categories. For a complex process, describe the steps in the surrounding text and use the image as supporting material rather than the only source of meaning.

Handle functional images

When an image is a link or button, the alternative should name the action or destination. A magnifying glass button may need """Search,""" while a company logo linked to the home page may need the site name. Do not give a decorative icon a second label when the visible button already has clear text.

When a text alternative cannot contain the information, provide a nearby long description, table, transcript, or download in an accessible format. Check that the alternative is available in the same language as the page. Translated pages need translated alt text; leaving a technical or local-language description behind can confuse readers.

  • Keep the text concise but not empty when meaning is present.
  • Check punctuation and reading order with a screen reader.
  • Do not put private data in filenames or alt text.
  • Test images at different sizes and with loading disabled.

Review in context

Read the page with images hidden and see whether the task still makes sense. Ask another person to identify what information the image adds. Update alt text when the image, surrounding copy, or purpose changes. A description that was correct for a product photograph may be wrong after the image becomes a decorative banner.

Useful alt text is editorial judgment made accessible. It explains the information or action that matters, avoids invention, and works alongside the words already on the page. Good writing helps every reader, including the person who receives the page without its pixels.

Do not use alt text to insert search terms that have no relationship to the image. Search engines and assistive technology both benefit when descriptions are accurate and natural. If an image is important enough to rank or persuade, it is important enough to describe honestly. If it adds no meaning, leaving it out of the reading order is the clearer choice.

Keep reading

Related guides