SiteCheck

Guides · Accessibility

How to write alt text for images

People who use screen readers cannot see a picture, so they rely on a text description called alt text. Some images on your page have none. Alt text also appears if an image fails to load. Without it, a screen reader may read out the file name or skip the image.

What alt text does

Alt text sits in the image's code, in the alt attribute. Visitors who can see the image do not normally see it.

What a screen reader does with the alt attributeThree versions of an image tag. With no alt attribute the reader may say the file name, which is a problem. With a description it reads the description. With an empty alt it skips the image. In the code What the listener gets <img src="IMG_204.jpg"> May hear "IMG_204.jpg" Problem: no alt attribute alt="Baker holding a tray of rye loaves" Hears the description Good: informative image alt="" Image is skipped Good: decoration only
A missing alt attribute and an empty one are different. The empty one is a deliberate choice.

How to write it

Imagine describing the image to someone over the phone. One short sentence is usually enough.

There is no fixed length limit in the standard. Shopify allows up to 512 characters and recommends 125 or fewer.

When to leave it empty

Some images add nothing: a divider line, a background pattern, or a photo whose caption already says the same thing. These should have an empty alt, written as alt="", so screen readers skip them.

The attribute still has to be present. A single space does not count, and our test reports it as a failure. Some builders leave the attribute out when the field is blank, and others write it empty, so rescan to find out which yours does.

How to add it

  1. Open your report and look at which images it lists.
  2. Find each one in your site editor and open its settings.
  3. Enter the description and publish.

The field is in a different place on each platform, and menus change:

If an image comes from a theme or app and has no field, ask its developer to add an alt attribute.

A rescan shows whether alt text exists. It cannot tell whether the text is accurate, so read your descriptions once yourself.