How to Write Alt Text That Helps

Alternative text, or alt text, is the short description attached to an image in the page code. Screen readers speak it, browsers show it when an image fails to load, and search engines read it. For a blind visitor it is the image.

Start with the purpose

Ask one question: if this image were missing, what would a visitor need to be told? The answer depends on why the image is on the page, not only on what is in the picture.

Take a photo of a woman who is using a laptop at a kitchen table.

  • On a furniture shop page the useful alt text is "Oak kitchen table with four matching chairs".
  • On an article about remote work it is "Woman working on a laptop at her kitchen table".
  • As a decorative banner above an unrelated article, it needs no description at all.

Rules of thumb

  1. Be brief. One sentence is usually enough. If you need more than about 150 characters, put the detail in the text of the page.
  2. Do not write "image of" or "picture of". The screen reader already announces that it is an image.
  3. Put the important part first.
  4. Include any text shown in the image, such as the words on a sign or a promotional banner.
  5. Describe the function of linked images. A magnifying glass icon that submits a search needs the alt text "Search".
  6. Keep keywords out. Stuffing alt text with search terms makes it useless to the people who rely on it.

Decorative images

Borders, background textures and stock photos that add mood but no information should have an empty alt attribute, written as alt="". This tells a screen reader to skip the image. Leaving the attribute out entirely is different and worse: many screen readers then read the file name aloud.

Charts, diagrams and infographics

A chart cannot be squeezed into one sentence. Give it a short alt text that names it, for example "Bar chart of monthly sales, January to June", and put the data or the conclusion in the text beside it or in a table. Everyone benefits from the written summary.

Logos and product photos

For a logo, use the organisation's name. If the logo links to the home page, "Acme home" is clearer. For product photos, say what distinguishes this photo from the others: the colour, the angle, the product in use.

Common mistakes

  • File names as alt text, such as "IMG_4032.jpg"
  • The same alt text on every image in a gallery
  • Alt text that repeats the caption word for word
  • Describing how a person looks when the page only needs their name and role

Check your own pages

Switch on Image Descriptions in the free ADA Okay! widget and move your mouse over the images on your site. You will see the alt text each visitor would hear, and a clear warning on images that have none. The widget shows what you wrote. Writing it is still a job for a person who knows the page.

Next, look at the other half of visual accessibility in our colour contrast guide.

Liv Sandmark, Content designer
Liv is a content designer who has rewritten forms, help centres and product pages for readers who use magnification, captions and screen readers. She writes about alt text, plain language and the editorial side of accessibility.

Get your ADA Widget today - for FREE!

Text reader, keyboard navigation, contrast modes and more with one line of code.

Get the free widget

Keep reading

What Accessibility Widgets Can and Cannot Do