Lab 2
Alt Text Studio
Alt text examples in context
One image. Five pages. Five different alt texts. If you write the same one five times, the lab will tell you.
Before you start
Most alt text advice reads like a description exercise: say what is in the picture. That advice produces alt text that is accurate and useless. A screen reader user on a product page does not need to know the kettle is "on a stove." They need to know what color it is and what the handle looks like, because that is what the photo is telling everyone else.
Alt text is a decision about the page, not a description of the pixels. The same image needs different alt text in a shop, in a recipe, in a safety notice, as decoration, and in a portfolio. Below is one photograph placed in each of those. Write what each page needs.
The lab
For each context, write the alt text, then press Compare. You will see your alt in the order a screen reader would announce it, a short review, and a curated answer with the reasoning. Your drafts stay in your browser.
What you just learned
- Context first, pixels second. Ask what the image is doing on this page. The answer decides what the alt says, and sometimes decides that it says nothing.
- Do not repeat the page. If the name, price, or caption is already in the text, the alt carries what is missing, not what is already there.
- Empty alt is a real choice.
alt=""tells a screen reader to skip the image. For decoration, that is the kind option. For anything that carries meaning, it is a hole in the page. - No "image of." Screen readers already say "image." The prefix just makes the reader hear it twice.
- Length follows purpose. A portfolio piece earns a longer, visual alt. A step in a recipe earns a short one. There is no right length, only a right amount.
About the picture
The kettle is a photograph generated for this lab, so there is no real product, no brand, and no license behind it, and no person took it. The file name a screen reader would fall back to without alt text, kettle-final-v3.jpg, is invented too. It is there to show what the reader hears when the alt is missing rather than empty.
Embed this lab
Host the Alt Text Studio on your own page with one element and one script. It runs entirely in the visitor's browser, sends nothing back, and adds a small credit link.
<div data-a11y-world-lab="alt-text"></div>
<script src="https://a11y.world/embed.js" async></script>
The lab's styles are scoped to its own container. If your page sets global styles on buttons or inputs, they apply inside the lab too, which is usually what you want.
Related notes
-
Alt text for charts: the data is the alt
A chart's alt text is one sentence that says what the chart shows. The numbers go in a table next to it, where a reader can move through them. An alt that holds twelve values is unreadable.
-
Alt text for generated images
When an image came from a model, the prompt is not the alt and the pixels are not the point. The alt carries what the image was made to do on this page.
-
Alt text is a decision, not a description
The same photo needs five different alt texts on five different pages. If you are describing pixels, you have skipped the only question that matters.
-
The empty alt is a choice
alt="" tells a screen reader to skip the image on purpose. A missing alt tells it to read the file name. They look similar in the source and could not be more different to a reader.
-
How an agent should decide on alt text
A five-question decision tree an AI agent can follow to choose alt text, in the order that produces the fewest wrong answers.
Wrote an alt you are proud of?
Send the image, the context, and the alt through the form. Good ones go in the gallery with credit.
Submit to the gallery