Lesson 2 of 3 Multimodal Understanding with Models and Content Understanding

Generating Accessible Alt Text and Image Descriptions

This lesson explains the accessibility guidance for text alternatives and how to configure generative models to draft alt text and extended descriptions at scale that meet it.

Learning outcomes

After completing this lesson, you will be able to:

  • Apply WCAG guidance to generated alt text.
  • Configure generation with the image's context.
  • Evaluate generated alt text for quality.
  • Generate descriptions in batches for a large image library.

Accessibility guidance

People who are blind or have low vision often use a screen reader, which reads a page aloud. When the reader reaches an image, it reads the image's alternative text (alt text) instead. If the alt text is missing, the user loses the information the image carries; if it is vague, such as "image1.jpg" or "chart", the user knows that something is there but not what it shows. The Web Content Accessibility Guidelines (WCAG) therefore require a text alternative for all non-text content that serves the same purpose as the image.

The phrase "the same purpose" is the key to good alt text, and it is why generated alt text needs context. A photo of a red jacket on a product page exists to show the product, so the alt text describes the jacket. The same photo in a news article about a fashion trend exists to illustrate the trend, so the alt text describes what it shows about the trend. A model that sees only the image cannot know which purpose applies. The following list summarizes the practices that alt text generation must follow.

  • Convey purpose in context: the same photo needs different alt text on a product page and in a news article.
  • Be concise: a short phrase or sentence, commonly under about 125 characters.
  • Avoid redundancy: no "image of" or "picture of", and no repetition of an adjacent caption.
  • Decorative images: empty alt text (alt="") so screen readers skip them.
  • Images of text: reproduce the text.
  • Complex images (charts, diagrams, maps): short alt text plus an extended description of the data or structure.

The following decision flow applies the guidance in order.

Choosing alt text. A decorative image gets empty alt text. An image of text reproduces the text. A chart, diagram or map gets short alt text plus an extended description. Any other image gets a short phrase that conveys its purpose in context, commonly under about 125 characters, without 'image of'.
Each question removes a special case, so the common case, a short phrase that conveys the image's purpose in its context, comes last.
True or false

Good alt text

Exam skills 3.2.4

Check four alt text practices against accessibility guidance.

Log in to try this activity Interactive activities are free with an account.

Configuring generation

The prompt receives the image together with its context, such as the page title, the surrounding paragraph and any caption, so that the description reflects the image's purpose. Structured output returns alt_text, is_decorative and, for charts and diagrams, an extended_description. Instructions forbid guessing sensitive attributes such as a person's identity, ethnicity or health, and ask the model to describe only what is relevant to the purpose.

Quality control

Generated alt text is evaluated against accessibility criteria with a rubric-based custom evaluator or human review, and important or public images are reviewed before publication because only the author knows the intended message. Length limits are enforced in code, and descriptions are regenerated when the surrounding content changes.

Generating descriptions at scale

Organizations with large image libraries generate alt text in batches rather than one image at a time. A pipeline reads each image and its context from the content management system, calls the model, validates the structured output, and writes the alt text back with a status that shows whether it has been reviewed. Images that are decorative, contain text or are complex charts can be routed to different prompts.

Cost and throughput are controlled by choosing the smallest model that meets the quality criteria in evaluation, by requesting a lower image detail level where fine detail does not matter, and by processing batches within the deployment's rate limits. Results with uncertain or sensitive content, such as images of people or medical images, are queued for human review rather than published automatically.

Worked example

A news site's charts

A news site wants alt text for 2,000 archived article images, including many charts. Screen reader users complain that existing chart descriptions such as "Bar chart" are useless, and that decorative divider images are read aloud.

Generate structured output from each image and its article paragraph: concise alt text, an is_decorative flag (empty alt for dividers) and, for charts, an extended description of the data trends and key values linked from the image. Review a sample against the rubric before applying it to the whole archive.

Check yourself

What alt text should a decorative image have?

Show answer

Empty alt text, so screen readers skip it. Meaningful images get brief alt text that conveys their purpose.

Exam Tips

Remember for the exam

  • Alt text conveys purpose in context, briefly; decorative images get empty alt text.
  • Charts and diagrams need an extended description.
  • Pass page context with the image; never guess sensitive personal attributes.