How do I write useful alt text for website images?
By SkillTech Digital Group
You upload a photograph and your website asks for “alt text”. Should you describe everything in the picture, paste the caption, or leave the box empty? Start with one question: what would someone miss if they could not see this image?
Alt text is a text alternative that can be read by assistive technology, including screen readers. A useful description carries the image's meaning in this particular page. It does not need to catalogue every object. The examples below are illustrative writing exercises, not customer projects.
Describe the detail that matters
Imagine a furniture page showing a desk. “Desk photo” adds little. “Oak desk with two drawers and a cable opening at the back” tells a prospective buyer something useful, provided those details are actually visible and accurate.
Now imagine the same photograph in instructions about assembling the desk. The useful description might be “Rear panel with the cable opening facing upwards”. The object has not changed; the reason for showing it has.
This is the central idea in W3C's Images Tutorial: choose the text alternative according to the image's information, function and context. Write the essential point in plain language, then remove details that do not help the reader understand the page.
Sometimes empty alt text is correct
A decorative flourish between sections may add atmosphere without adding information. An ordinary HTML image used only for decoration should have an empty alternative: alt="". That lets assistive technology skip it.
Empty is different from missing. As W3C's decorative-image guidance explains, omitting the attribute can cause some screen readers to announce the filename. Writing “decorative image” simply adds something else to listen to.
Context matters here too. SkillTech's gateway artwork can decorate a section whose message is already written alongside it. In an article discussing the artwork itself, “Tall curved dark walls frame a golden sunrise reflected on a polished floor” could convey relevant visual information. Neither treatment is a universal label for that file.
For image links, explain the destination
If an image is the only content inside a link, its alternative needs to explain where that link goes. A fictional furniture company's linked logo might use “Oaklane home”. A basket icon that opens the basket needs a name such as “View basket”, rather than a description of its shape.
If the same link already includes visible text that explains the action, repeating it in the image's alt text can be unnecessary. Check the whole link, not just the image upload field. W3C's functional-image examples show how these cases differ.
Give charts and text room to breathe
A chart may need more than one sentence. Use a short alternative to identify it, then provide its important information in nearby text or an accessible table. For an illustrative delivery chart, that could include the periods, values and trend, rather than just “Blue bar chart”. W3C describes this approach in its complex-image guidance.
If a poster contains information that appears nowhere else, that information also needs a text equivalent. Better still, put essential event details into ordinary page text so readers do not have to rely on the poster. Avoid squeezing a whole event programme into a single image description.
Your five-minute image check
- Choose one page. Start with an important service, product or contact page.
- Identify each image's job. Does it inform, decorate, or trigger an action?
- Write for that job. Describe useful information or the action; use an empty alternative for purely decorative images.
- Check the surrounding text. Remove needless repetition and make detailed information available outside charts and posters.
- Check the saved page. Confirm the actual image element has the intended alternative. A media-library description field may serve a different purpose in your website editor.
Use W3C's alt-text decision tree when a case is unclear. This small exercise is a starting point for better image accessibility, not a complete accessibility audit. The goal is simple: help people understand the same message, even when they experience the page differently.