Reference guide · cited sources
Writing Alt Text: A Practical Guide for Images
Alt text is the text a screen reader announces in place of an image. Written well it conveys what the image contributes; written badly it wastes the listener's time. The difference is not length or effort — it is whether you asked what the image is doing on the page.
By Prashantkumar Kishanrao Sundge · Published · Reviewed
What this guide establishes
- Ask what the image contributes, then write that. The same photograph needs different alt text in different contexts.
- Purely decorative images should have an empty alt attribute, not a description. Empty is a decision; missing is a bug.
- Never start with 'image of' or 'picture of'. Screen readers already announce that it is an image.
- Text inside an image is invisible to screen readers, untranslatable, and unsearchable. Use real text wherever possible.
- A functional image — a link or button — needs alt describing the action, not the picture.
The question that produces good alt text
Do not ask what the image shows. Ask what it contributes to this page, for someone who cannot see it. Those are different questions and the second one produces useful writing almost automatically.
Consider one photograph of a person at a laptop in a café. On an article about remote working it is decorative, adding atmosphere but no information, and should have empty alt text. On a product page for that laptop model it conveys the machine's size and build, and the alt text should describe those. On a news story about that specific person it identifies them, and the alt text should name them. Same file, three correct answers.
This is why alt text cannot be generated reliably from the image alone, by a person or by software. The image does not contain its own purpose; the surrounding page supplies it. Automatic description tools can tell you what is depicted, which is a useful starting point and not the same thing as knowing what to write.
Decorative images and empty alt
Many images carry no information. Background textures, dividers, decorative flourishes, and stock photography chosen purely for visual rhythm all fall into this category. Describing them interrupts the listener with content that adds nothing.
The correct treatment is an explicitly empty alt attribute — written out as an empty value, not omitted. An empty alt tells assistive technology to skip the image silently. A missing alt attribute means something quite different: the software does not know whether the image matters, and may read out the filename instead, which is usually a string of characters nobody wants to hear.
So empty alt is a deliberate statement that the image is decorative. It is the right answer more often than people expect, and it improves the experience rather than degrading it. Describing every decorative image in the name of thoroughness makes a page worse to listen to.
Writing the text itself
Be specific and concise. 'Bar chart showing revenue rising from £1.2m in 2024 to £3.8m in 2026' is far more useful than 'chart' and also more useful than three sentences of description. If the point of the chart is the trend, state the trend.
Do not begin with 'image of', 'picture of', or 'graphic showing'. Screen readers announce the element type already, so these phrases produce 'image, image of a red bicycle'. Start with the content.
Do not stuff keywords. Alt text written for search engines rather than for people is unpleasant to listen to and has been a recognised bad practice for many years. Write for the listener.
Length should follow purpose. Most images need a short phrase or single sentence. A complex diagram or infographic may need more — but if you find yourself writing a paragraph, the information probably belongs in the page itself, where everyone can read it, with the alt text pointing at it.
Include text that appears in the image. If a logo contains the company name, or a screenshot contains an error message, that text is part of what the image conveys and must be in the alt text, because it is otherwise completely inaccessible.
Functional images
When an image is a link or a button, the alt text must describe what it does, not what it looks like. The listener needs to know where the control leads, not that it is a triangle.
A magnifying-glass icon that opens search should have alt text reading 'Search', not 'magnifying glass'. An envelope icon linking to a contact page should read 'Contact us'. A logo in a site header that links home should read with the site name, and often serves as the home link — so naming it is more useful than describing the mark.
A common failure is a linked image with empty alt text. The link still exists and is still reachable by keyboard, but it announces nothing, leaving the listener with an unlabelled control. If an image is interactive, it needs text; empty alt is only correct for decoration.
Where an icon sits next to a text label that already says the same thing, the icon is decorative and should have empty alt. Otherwise the control announces its name twice.
Text inside images is the bigger problem
Alt text is a repair for an image. Some images should not have been images in the first place. Putting words into a picture — a quote rendered as a graphic, a price list exported from a design tool, a promotional banner with the offer set as artwork — creates several problems at once and alt text only partially addresses one of them.
The text cannot be selected or copied. It cannot be found by a page search or indexed properly. It does not reflow when the window narrows, so on a phone the reader gets a shrunken image instead of readable text. It cannot be translated by browser translation tools. It does not respond when a user increases their font size, and it does not adapt to a high-contrast or dark theme. And it is only available to a screen reader through whatever the alt text happens to say.
Accessibility guidance treats images of text as something to avoid except where the particular visual presentation is essential — a logo being the standard example. The practical rule for everything else: if it is words, make it words, and style them with CSS.
Complex images: charts, diagrams, and infographics
A data visualisation cannot be reduced to one sentence without losing the data. The usual approach is two-layer: brief alt text identifying what the image is and stating its main point, plus a fuller equivalent elsewhere on the page.
That fuller equivalent can be a data table, a paragraph describing the pattern, or a link to the underlying figures. All three benefit every reader, not only those using assistive technology — a table of the numbers behind a chart is frequently what a sighted reader wants too.
For a process diagram or flowchart, describe the structure in text: the steps, their order, and the branches. This is often clearer than the diagram itself and is worth writing regardless.
The test is substitution. If you removed the image entirely and left only your text alternative, would a reader still get what the image was there to convey? If yes, you are finished. If no, the alternative is incomplete.
Checking your work
Read the page with the images removed, substituting your alt text where each image was. If it reads as a coherent document, the alt text is doing its job. If it reads as a list of disconnected descriptions, or leaves obvious gaps, it is not.
Listen to a page with a screen reader at least once. Most operating systems include one, and using it for five minutes changes how you write alt text permanently — particularly the habit of starting with 'image of', which becomes obviously wrong the moment you hear it.
Automated checkers catch missing alt attributes, which is worth doing, but they cannot judge whether the text is any good. A page can pass every automated check with alt text reading 'image1' on every image. The judgement is human.
How this guide was written
This is a reference guide. It explains published specifications, platform rules, and format behavior, and every factual claim is attributed to the sources listed below. It does not report an in-house PixelConvert measurement, and no result here should be read as one.
Read how PixelConvert separates measured and reference guides →Limitations
- This guide summarises widely accepted accessibility practice and cites the W3C guidance it derives from; it is not a substitute for reading that guidance or for testing with real users.
- It reports no in-house PixelConvert measurement.
- Specific conformance requirements depend on which standard and level a project is held to, and on applicable regulations in a given jurisdiction.
Frequently asked questions
- What makes alt text good?
- Writing what the image contributes to the page rather than what it depicts. The same photograph needs different alt text depending on whether it is decorative, illustrating a product, or identifying a person.
- Should every image have alt text?
- Every image needs an alt attribute, but decorative images should have an empty one so assistive technology skips them. Empty alt is a deliberate decision; a missing attribute is a bug and may cause the filename to be read out.
- Should I start alt text with 'image of'?
- No. Screen readers already announce that the element is an image, so the phrase produces a redundant double announcement. Start with the content.
- How long should alt text be?
- Usually a short phrase or one sentence. If you need a paragraph, the information probably belongs in the page itself where everyone can read it, with brief alt text pointing to it.
- What about an image that is also a link?
- Describe the destination or action, not the picture. A magnifying-glass icon opening search should read 'Search'. A linked image with empty alt leaves an unlabelled control.
- Is it bad to put text inside an image?
- Generally yes. It cannot be selected, searched, translated, resized, or reflowed, and is available to screen readers only through the alt text. Accessibility guidance treats images of text as something to avoid except where the visual presentation is essential, such as a logo.