We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

Writing Effective Text Alternatives for Images

What text alternatives are

The text behind the visuals

A text alternative is text that serves the same purpose as non-text content mages, icons, charts, or graphics. For images, it usually lives in the alt attribute of the <img> element, which is why it is commonly called alt text. Assistive technology announces this text in place of the image, so people who cannot view the image still get its meaning.

Why they matter

Without a text alternative, an image is a gap in the content for screen reader users. A good text alternative closes that gap by conveying the image's meaning or purpose not its pixels. Text alternatives also help when images fail to load, support search engines, and give context to people on slow connections.


What to consider when writing one

Purpose comes first

The right text alternative depends on why the image is on the page, not on what it depicts. The same photo can need a description in one place and an empty alt="" in another. Before writing, work out the image's role in its context:

  • Informative—the image adds information the text does not provide. Describe that information concisely.
  • Functional—the image works as a link or button. Describe the action or destination, not the appearance.
  • Decorative—the image is purely visual styling. Use an empty alt="" so assistive technology skips it.
  • Complex—the image carries more information than a short phrase can hold, like a chart or infographic. Pair a short alt text with a longer description elsewhere.

Qualities of an effective text alternative

  • Equivalent—it conveys the same meaning or purpose as the image in its context
  • Concise—a short phrase or sentence; longer content belongs in a long description
  • Not redundant—it does not repeat the surrounding text or start with "image of"
  • Accurate—including any text that appears inside the image

Learn More

These two articles cover the process in depth—first classifying the image, then writing the text:

  1. Identifying Image Types for Writing Alt Text—why and how to classify an image as informative, functional, decorative, or complex, with cues and examples for each type.
  2. Writing Effective Alt Text—how to write the text alternative for each image type, with code examples, best practices, and common mistakes.