Write product alt text for the image’s role in a page
Apply the WAI decision tree to a gallery image, an image link and decoration.
The problem
The same bag photo appears in a gallery, beside a product title inside a card and as an image-only link. Reusing its description can produce repeated announcements and bury the useful information. Check what each occurrence contributes.
The tool
WAI's alt decision tree distinguishes informative, functional and decorative images. Apply it to one template before rolling out changes across a catalog.
The steps
- List gallery photos, cards and image-only links. One photo can serve a different purpose in each location.
- Ask what a gallery user would miss if the image disappeared. If it reveals a useful detail, write Interior zip pocket in the travel bag.
- Give an image-only link a name that identifies where it goes, such as Gray travel bag details.
- If the photo and the product title are inside the same link and the photo adds no information, set
alt=""to avoid repeating the title. Keep the attribute. - Use empty alt for purely decorative images. Write material, dimensions and stock information in page text so they survive missing images.
- Inspect all three cases with a screen reader or the accessibility tree. Confirm the link names, the gallery detail and the absence of a repeated card title.
The real cost
No paid service is needed. Budget time for making contextual choices and correcting patterns that automatically copy descriptions across templates.
The free alternative
Hide the images temporarily and read the page. Use this to find missing information, then check link names with the accessibility tools.
Notes
- We have not tried these steps ourselves yet. They are based on the official docs. Button names may change. If your interface differs, follow the docs.
- A filename such as
bag-7.jpgdoes not describe a product. - Describe the image shown. Track the availability of a color in product data that can change independently.
Sources
Did you like this guide?
The weekly newsletter is being prepared. Leave your email and we'll send it when it launches.
We use your email only to send the newsletter. Privacy policy
