The decision tree
Permalink:- Does the image act as the only label for a link or button? Name the place it takes the reader or the action it performs.
- Does it tell the reader something they need to know? Give the useful detail in a short phrase or sentence.
- Is there too much to say in a short phrase? State the point in
altand provide the rest in nearby text or a data table. - Does it add no information or repeat text that is already next to it? Use
alt=""so a screen reader can skip it.
Ask the question on the page where the image appears. A photo of a bike can have a different job in two places. On a repair guide, a close view of a tire may be there to show a tear along the rim. On a page about opening hours, the same photo may be there to fill space next to text that already names the repair service. The first use calls for a note about the tear. The second may need no words at all.
Try reading the paragraph with your alt text in place of the picture. If the phrase breaks the flow or repeats what you just read, change it. If the reader still has to see the picture to know what to do next, put the missing step in the page text. That is important for instructions such as where to enter a building or which part to remove from a tool.
Examples by image type
Permalink:A photo that shows a useful detail
Permalink:A repair page uses a close-up to show which mark means a brake pad needs to be changed. "Brake pad" is true but leaves out the point of the photo. "Brake pad worn down to the marked line" tells the reader what to look for. If it matters where the line is, spell that out in the guide so the repair does not depend on a photo alone.
<img src="brake-pad.jpg"
alt="Brake pad worn down to the marked line">
The best words may change if the photo is used again in a news story. If the story is about a workshop, the reader may need to know that a volunteer is showing someone how to check a brake pad. Only describe what is visible or known from the story. Do not guess a person's name, age, or mood from how they look.
A linked image with no other label
Permalink:When the only thing inside a link is the club logo, name the link's destination. "Repair cafe home" makes sense in a list of links. "Blue wrench" tells someone how the logo looks but gives them no clear reason to follow it. If the same link also contains visible text that says "Repair cafe home," the logo can have empty alt so the link is read once.
<a href="home.html">
<img src="logo.svg" alt="Repair cafe home">
</a>
Use the same rule for a button with a small image. If its job is to print the guide, "Print guide" is a useful name. "Printer icon" describes the shape but leaves the reader to work out the action. For a button that already has the words "Print guide," use those words as its label and keep any extra icon out of the spoken name.
A chart with more than one finding
Permalink:For a line chart of repair visits, try alt text like "Repair cafe visits rose from April to July." Put the monthly totals in a nearby table with clear column headings if the reader needs the exact values. Name the unit and the time span in text, and explain any gap where figures are missing. A reader who cannot see the chart should still be able to use the figures to answer the same questions. If the surrounding text already gives the finding and the chart adds a detail worth noting, use the alt text to tell the reader what the chart is for and where to find its data.
An image that contains words
Permalink:Use real text for notices and instructions whenever possible. It can wrap on a phone and still be read when someone zooms in. If the source has to stay an image, such as a photo of a dated flyer, put the useful facts in the page: the event, the time, and where people should go. If you include all those words next to the image, the alt text does not need to repeat the flyer word for word.
When alt should be empty
Permalink:Use alt="" for a decorative img such as a divider between two sections.
Give an unnamed photo the same treatment only after you check that a reader would lose nothing by skipping it.
A photo that shows which entrance has a ramp is useful even if it is next to an address.
A stock photo of a wrench next to the words "Tool list" may add nothing.
<img src="divider.svg" alt="">
Leaving alt out is different from giving it an empty value.
Without alt, a screen reader may announce the image and read a filename or part of its address.
With empty alt on a plain decorative image, the browser can leave it out of what the screen reader needs to announce.
Do not use empty alt on the only image in a link unless the link gets its name from somewhere else.
Check the link the way a user would: can you tell where it goes without seeing the picture?
The mistakes we see most
Permalink:Avoid using a filename as a description. "IMG 0442" means little to someone who did not take the photo. Avoid copying the same words to every image in a list of parts. If the photos are needed to tell the parts apart, describe the difference, such as the long handle or the red safety latch. If sight is not needed to tell them apart, name the parts in text so no one needs to infer their names from a photo.
In most cases skip "image of" at the start, since screen readers often announce that an item is an image already. Keep the medium when it matters: "Map of the bus stops near the cafe" is more useful than "Streets near the cafe." Use the text a reader needs rather than squeezing in search terms or aiming for a fixed number of letters. If removing a phrase does not change what the reader learns, leave it out.
When an AI tool suggests alt text, compare each claim with the picture and the text around it. The tool may name an object that is not there or miss the feature that explains a step in your guide. Check what the browser exposes for the image and for any link around it. Then listen to the paragraph with a screen reader to catch repeated words that are hard to notice in the code.
Is there a fixed length for alt text?
Permalink:No. Use the shortest text that does the job, and give long explanations in the page itself. For a link or button, start with a short label that names where it goes or what it does.
The alt-text debates, 2007-2009
Permalink:The proposal from the 2007-2009 archive records a suggested change to the image section of the HTML5 draft.
In the original mailing list discussion, contributors explored whether the browser could request a different version of an image or its content instead of relying on alt text and other fallbacks.
Read both as part of the debate at the time, not as current browser instructions.
For a modern check, write one phrase that replaces the image's purpose, then read the page without the image and see whether the same task is still possible.
After writing your text alternatives, validate your HTML to catch a missing alt attribute or a mistake in the surrounding markup.
Find more markup exercises in the Learn HTML hub.