Alternative Text with AI: a Lab for Describing the Function of Images

Let's discuss your project →

According to the W3C WAI image decision tree, alternative text changes based on the role of the image: informative, functional, or decorative.

AI can suggest alt text, but its usefulness depends on the page context. This editorial lab is meant to set up a reasoned review, not to replace human editing or certify accessibility compliance.

Set up three simulated contexts

Imagine the same photograph of a training room. In the first case, it accompanies an article that already describes the room; in the second, it documents the layout of the workstations; in the third, it is a link to book a visit. The role of the alt text changes even though the pixels are the same.

Work with authorized material and avoid unnecessary personal data. Give the model the verified description of the image, the surrounding text, and any link destination. If the model can see the photo directly, still check that it does not assign identities or traits that are not observable.

A prompt to generate a draft

Assess the role of the image in the context provided.
Propose a short alt text and explain why.
Do not invent people, places, or details that are not confirmed.
If the image is decorative or redundant, flag that as a hypothesis
for editorial review. If it is a link,
consider its function together with the other accessible text.

The expected output is a proposal to review, not a description to apply automatically. A possible text for the second scenario is “Workstations arranged in a horseshoe shape,” but only if that layout is actually visible and useful to the content.

Check the full page

A decorative image may require an empty alt attribute. An image that is itself a link must make the destination understandable. For a complex chart, the data may need explanation in the page content: one short sentence cannot replace all the information.

Have the page read by someone who did not help draft it, and test the path with keyboard navigation and a screen reader. Check for repetition, ambiguous link names, and missing information.

Record how many suggestions needed correction and which errors recur. The benefit to look for is a clearer review process, not the largest number of generated descriptions. Before expanding AI use, assign final responsibility for the text to someone who understands the content and function of the page.

Sources