Use AI to draft alt text without letting it guess
Decide what the image is doing on the page, then use AI to draft alt text and check the wording before it goes live.
A product photo may need very different alt text — the replacement a screen reader speaks, or that appears when the image does not load — on a sales page, in a review, or on a button. The problem is not whether AI can see the object in the picture. The problem is whether it knows what that image is doing on the page. Upload the image and ask only for alt text, and the model can return a fluent sentence that is extra, thin, or aimed at the wrong job.
W3C puts the image’s context and function at the center. An informative image needs a short account of the important information. A decorative image can use alt="". An image used as a button or a link needs a description of the function. A chart or other complex figure usually needs a full equivalent somewhere else on the page. MDN also notes that alt text should be a meaningful replacement, not the word image or a repeat of the file name.
This piece is for bloggers, people who look after a website, and people who publish on social media or in marketing. They want a faster draft from AI and they keep responsibility for the final wording. The prompt and the example below were built by the editors. They have not been run as a recorded test on one model, one content management system (CMS), or one screen reader.
Start with the job, not the file
Before you open an AI tool, look at the image on the actual page or post and pick one of four situations:
- The image carries information the surrounding text does not already say.
- The image is only decorative, or it repeats what sits right beside it.
- The image is a button, an icon, or a link with an action.
- The image is a chart, a diagram, or a figure that holds a lot of data.
A person makes this choice. AI may recognize a person holding a coffee cup. It does not know whether, in this piece, the point is the new cup, the café, or a picture that only sets a visual pace.
For a decorative image, do not push the tool to produce a sentence just so the field is filled. W3C recommends empty alt text for a purely decorative image, so assistive technology can skip it. For a complex chart, do not pack every number into one long alt sentence either. The full information belongs in an equivalent on the page.
Hand over the image and the words around it
A more useful prompt than write alt text for this image looks like this:
I am preparing alt text for an image on a website.
TEXT AROUND THE IMAGE:
[paste 1–3 sentences from before or after the image]
ROLE I HAVE ASSIGNED TO THE IMAGE:
[informative / decorative / functional / complex chart or figure]
TASK:
- If the image is informative: propose 2 short alt texts. Favor what the image adds in this context.
- If the image is decorative: say plainly that empty alt text should be considered, instead of forcing a description.
- If the image is functional: describe the action or the destination, not only the shape of the icon.
- If the image is complex: write a short alt that states the purpose, and list which information should become a longer description or a table in the page.
- Do not guess names, places, brands, emotions, ages, relationships, or details you cannot see with confidence.
- End on its own line with `What I am not sure about:` and list every detail a person needs to confirm.
The prompt does not turn the model into an accessibility specialist. It ties the output to the context decision the editor already made.
One photo, two pages, two alt texts
The next situation is constructed. Suppose a photo shows a blue water bottle on a wooden table.
On the product page, the text beside the image says: A 750 ml bottle with a flip lid and a carrying handle. Here the image lets the reader see the shape and where the handle sits. A reasonable alt text could be: A blue 750 ml water bottle with a flip lid and a handle on the body.
The same photo then shows up in a blog post titled Five ways to keep a desk tidier, where the bottle is only there for the layout. If the writing does not need anything from the bottle, empty alt text can fit better than a detailed description.
Keep this distinction: alt text is not a caption, and it is not an exercise in describing every pixel. It replaces the information or the function that image brings into that one context.
Check by removing the image
After the model proposes wording, do not ask it is this sentence fine? Read the surrounding text and the alt text while imagining the image is gone.
If the reader still gets the information or the function the image was meant to carry, the draft is aimed the right way. If the alt sentence nearly repeats the paragraph just before the image, you may be adding noise. If it adds a name, a place, an emotion, or a purpose you cannot confirm, delete that guess.
When the image is a link or a button, read the alt text as a command. Magnifying glass is usually less useful than Search. Right arrow is less useful than See the next product. W3C calls this a functional image: the alternative should carry the function, not only the appearance.
When the draft describes too much
A common miss is a model trying to prove it looked carefully. Color, light, layout, mood, and the position of every object all get included. Return to one question: what information disappears if the reader cannot see the image?
A short follow-up can cut it back:
Keep only the information needed to replace this image's role in the context already given.
Remove decorative detail, detail already in the surrounding text, and any guess that has not been confirmed.
If the image is actually decorative, say so instead of forcing alt text.
If the image is a chart, a process diagram, or an infographic, do not keep cutting until the data is gone. Move the important data into text or a table in the article. The short alt only needs to say what the figure is and where to read the full equivalent.
One pass before you publish
Before you publish, read the alt text with the heading and with the paragraphs before and after the image. Check that it names the right role, skips useless repetition, contains no guess, and does not try to fit complex data into one sentence. If the CMS offers an accessibility preview, or if you have a screen reader, listen on the real page. How assistive technology reads a page depends on the HTML and on the page’s actual structure, not on an alt sentence standing alone.
AI earns its place here when it helps you produce a draft and notice, sooner, which details still need a person. Whether the image needs alt text, empty alt text, a functional description, or a longer equivalent still depends on the page where it will be published.
Further reading
- W3C WAI — Alt Decision Tree: a short decision path for informative, decorative, functional, and complex images.
- W3C WAI — Images Tutorial: each image group, and the kind of alternative text that fits it.
- MDN — HTML img element: practical notes on the
altattribute and on writing a meaningful replacement.