Use AI to draft alt text without letting it guess
A practical workflow for using AI to draft alt text while keeping context, decorative-image decisions and final verification in human hands.
The same product photo can need very different alt text on a shop page, in a review, or inside a clickable control. The hard part is not whether an AI model can recognize objects in the image. The hard part is whether it understands what the image is doing on this page.
If you upload an image and ask only “write alt text,” the result may sound fluent while still being too long, redundant, or wrong for the context. A better workflow starts with a human decision about the image’s role, then uses AI only to draft language inside that boundary.
W3C puts context and function at the center of text alternatives. An informative image needs a short equivalent for the information it contributes. A purely decorative image may use an empty alt="". An image used as a link or button should communicate its function. A complex chart or diagram usually needs a fuller equivalent elsewhere on the page. MDN makes the same basic point: alt text should be a meaningful replacement, not a filename or a generic phrase such as “image.”
This guide is for bloggers, site owners, social teams and content marketers who want AI to speed up drafting while keeping responsibility for the final result. The prompts and examples below are editorial examples, not recorded test results from a fixed model, CMS or screen reader.
Start with the question: what is this image doing here?
Before opening an AI tool, look at the image in its real page context and choose one of four roles:
- It adds information that the surrounding text does not already provide.
- It is decorative or repeats information already available nearby.
- It is a functional image such as a button, icon or link.
- It is a complex image such as a chart, diagram or data-heavy infographic.
This is a human editorial decision. AI may be able to see “a person holding a coffee cup,” but it does not automatically know whether the page cares about the cup design, the café setting, the person’s action, or none of those details.
For a decorative image, do not force the model to invent a sentence just because there is an image field to fill. W3C recommends empty alt text for images that are purely decorative so assistive technology can skip them. For a complex chart, do not squeeze every data point into a giant alt attribute. Put the complete information in nearby text or a table, and let the short alt text identify the chart and its purpose.
Give AI the image and the page context
A more useful prompt than “write alt text for this image” is:
I am preparing alt text for an image on a web page.
SURROUNDING CONTEXT:
[paste 1–3 sentences before or after the image]
IMAGE ROLE I HAVE ALREADY DECIDED:
[informative / decorative / functional / complex]
TASK:
- If the image is informative, propose two short alt-text options
focused on what the image adds to the surrounding text.
- If it is decorative, tell me to consider empty alt text rather
than forcing a description.
- If it is functional, describe the action or destination, not just
the shape of the icon.
- If it is complex, write a short alt text that identifies the image
and list the information that should be provided in longer text.
- Do not guess names, locations, brands, emotions, ages, relationships
or details that are not clearly visible.
- End with a separate section called "Uncertain details" and list
anything a human should verify.
This does not make AI an accessibility expert. It simply makes the draft follow the context decision you already made.
One image can need two different answers
Consider a synthetic example: a photo shows a blue 750 ml water bottle on a wooden desk.
On a product page, the nearby copy says: “The 750 ml bottle has a flip-top lid and a carrying loop.” The image contributes information about the bottle’s shape and where the loop sits. A reasonable draft could be:
Blue 750 ml water bottle with a flip-top lid and carrying loop on the side.
Now put the same photo in a blog post called “Five ways to keep your desk less cluttered.” If the bottle is only visual decoration and the article does not depend on it, empty alt text may be more useful than a detailed description.
The important distinction is that alt text is not a caption and it is not an exercise in describing every pixel. It is a text replacement for the information or function the image contributes in that specific context.
Test the draft by mentally removing the image
After AI proposes a draft, do not ask it whether its own answer is good. Perform a simple check yourself: imagine the image is gone, then read the surrounding text together with the proposed alt text.
Ask:
- Does the reader still receive the information or function the image was meant to provide?
- Does the alt text repeat a sentence that is already immediately next to the image?
- Does it introduce a person’s name, a place, an emotion, a relationship or an intention that you cannot verify?
- If the image is a link or button, does the text describe the action rather than the icon shape?
For a functional image, “magnifying glass” is usually less useful than “Search.” “Right arrow” is usually less useful than “View next product.” W3C treats these as functional images: the replacement text should communicate what the control does.
When the model writes too much
AI often tries to prove that it noticed everything: lighting, colors, composition, mood and the position of every object. Return to one question: what useful information would be lost if the reader could not see this image?
You can shorten the draft with:
Keep only the information needed to replace the role of the image
in the context I provided.
Remove decorative details, details already stated in nearby text,
and anything that has not been verified.
If the image is actually decorative, say so instead of forcing
an alt-text sentence.
For a chart, process diagram or infographic, do not keep shortening until the data disappears. Move the important data into the article or a table. The short alt text can identify the chart and point the reader toward the fuller equivalent.
Do one final check in the real page
Before publishing, read the alt text together with the heading and the paragraphs around the image. Check that it reflects the image’s role, avoids useless repetition, contains no unsupported guesses, and does not try to compress a complex graphic into one sentence.
If your CMS has an accessibility preview or you use a screen reader, listen to the image inside the actual page. How assistive technology experiences a page depends on the markup and surrounding structure, not just the alt text in isolation.
AI is useful here when it helps you draft faster and exposes details that still need confirmation. The decisions about whether an image needs alt text, empty alt text, functional text, or a longer equivalent still depend on the publishing context.
Further reading
- W3C WAI — Alt Decision Tree — a quick decision tree for informative, decorative, functional and complex images.
- W3C WAI — Images Tutorial — guidance on image categories and appropriate text alternatives.
- MDN — HTML
<img>element — practical reference for thealtattribute and meaningful text alternatives.