Skip to main content
All articles

October 30, 2026·7 min read

How to Write Alt Text for Screen Readers and SEO

Good alt text serves screen reader users first and helps search engines second. Learn the three image types, with before and after examples for each one.

accessibilitywcagalt-textimagesscreen-readerseowordpressecommerce

Alt text is the text alternative a screen reader announces in place of an image. Search engines also read it when they index images, which is why alt text sits at the meeting point of accessibility and SEO. The order of priorities matters: write for the person first, and the search benefit follows from accurate description. Stuffing keywords into alt text helps neither reader, since it makes the announcement longer and less useful.

The W3C WAI Images Tutorial divides images by purpose, not by appearance. The same photograph needs different alt text on different pages, because its purpose changes with context. A photo of a dog needs a brief mention on a parks page and a detailed description on a dog training page. Start by asking what the image is for on this page, then pick the type.

Key takeaways

  • Ask the image's purpose first: decorative, informative, or functional.
  • Decorative images get an empty alt attribute, alt="", so assistive technology skips them.
  • Informative images get a short phrase or sentence covering the key information.
  • Functional images, links and buttons, get alt text describing the action or destination.
  • Never stuff keywords into alt text. Describe the image in plain words and let relevance follow.

The three types, with examples

Decorative images add visual interest and carry no information the reader needs. A stock photo divider, a background flourish, or a stock image beside a paragraph that already states the point in text are decorative in that context. The correct alt text is empty: alt="". That is different from leaving the alt attribute out entirely. A missing alt attribute leaves the screen reader to guess, often by announcing the file name. An empty alt attribute is a deliberate instruction to skip the image.

<img src="divider-flourish.jpg" alt="">

Informative images graphically represent concepts and information. A product photo, a chart, a diagram, and a photo that illustrates a step all count. The text alternative should be at least a short description conveying the key information presented by the image. Keep it concise: the most important information first, in a short phrase or sentence. If more than a sentence is needed, the image is likely complex, and the page needs a longer description nearby as well as a short alt.

Failing version:

<img src="IMG_4821.jpg" alt="IMG_4821">

Passing version:

<img src="red-wool-scarf.jpg" alt="Red wool scarf with fringe, folded on a wooden table">

Functional images act as links or buttons. The alt text should describe the function or destination, not the picture. A printer icon that prints the page needs alt text such as "Print this page". A logo that links to the homepage needs alt text naming the destination, such as the company homepage. A search icon button needs alt text such as "Search". Describing the icon's appearance instead of its job forces the listener to guess what will happen when they activate it.

Failing version:

<a href="/print"><img src="printer-icon.png" alt="Small grey printer"></a>

Passing version:

<a href="/print"><img src="printer-icon.png" alt="Print this page"></a>

Two more types complete the picture. Images of text, where readable text sits inside the image, should carry the same words in the alt text, unless the image is a logo. Avoid images of text where real text would work, since real text can be resized, translated, and restyled. Complex images, such as graphs and diagrams, need a short alt that identifies the image plus a full text equivalent of the data somewhere on the page, such as a data table or a linked description.

A decision routine for every image

Work through these questions in order for each image on a page:

  • Is the image a link or a button? If yes, write the action or destination as the alt text.
  • Does the image add information the reader needs, beyond the surrounding text? If no, use alt="".
  • Is the same information already given in nearby text? If yes, and the image adds nothing new, use alt="".
  • Otherwise, write the key information in a short phrase or sentence, most important detail first.
  • If the image is a chart or diagram, add a full text version of the data on the page and point to it.

That routine also settles the common argument about product photos. A product photo on a product page is informative: it shows color, shape, and detail the buyer needs. Its alt text should name the product and its key visible traits, such as color and material. The same photo reused as a decorative banner on a category page, where the product name already sits in text beside it, may be decorative there. Context decides, not the file.

Alt text and SEO, honestly stated

Search engines use alt text to understand images, which can help an image appear in image search results for relevant queries. That benefit comes from accurate description, not from keyword repetition. An alt attribute that reads as a list of search terms is a poor announcement for a screen reader user and a weak signal for a search engine, because it does not describe what the image shows.

Write alt text the way you would describe the image to someone on the phone who needs to understand the page. Use the words a buyer or reader would naturally use, including the product name or topic where it is part of the description. Do not repeat the page title, do not add "image of" or "picture of" at the start, since screen readers already announce the presence of an image, and do not stuff variant spellings or nearby keywords into the attribute. If the image genuinely shows the thing the page is about, the relevant words will appear naturally.

Length is a practical guide, not a rule with a number attached. The WAI tutorial describes informative alt text as a short phrase or sentence. If you need a paragraph, the image is complex and the page needs a longer description, not a longer alt attribute. Keep alt text short enough to announce comfortably, and put detail in the page text where everyone can use it.

Common mistakes

  • Leaving the alt attribute out, so the file name gets announced.
  • Using alt="" on an informative image, which hides meaning instead of decoration.
  • Writing "image" or "picture" at the start of every alt attribute.
  • Describing the icon instead of the action on a functional image.
  • Repeating the caption word for word in the alt text, which forces the listener to hear the same words twice.
  • Stuffing keywords into alt text at the cost of a clear announcement.
  • Giving every image on a page the same generic alt text, such as the site name.

How Axeazy helps with this exact issue

Axeazy lists alt text among the 14 fix categories it works on. A scan can flag images with missing alt text in your code. Read the honest scope on the capabilities page. For WordPress sites, the WordPress plugin page describes the free plugin's three instant fixes, one of which is an alt text fallback, with paid plans adding AI written alt text saved back to the media library.

For related image guidance, see the alt text for product photos guide, which works through variants, colors, and lifestyle shots, and the accessible checkout form guide, where functional images inside forms need action based names.

Want a quick read on your own site? Run Axeazy's free 60 second scan . It needs no signup.

Last checked: October 30, 2026.

FAQ

Should decorative images have alt text?

They should have an empty alt attribute, alt="". That tells assistive technology to skip them on purpose. Leaving the attribute out is different: the screen reader may then announce the file name.

How long should alt text be?

A short phrase or sentence covering the key information. If a paragraph is needed, the image is complex, and the page should carry a longer description with the data, while the alt attribute stays short.

Does alt text help SEO?

Yes, when it accurately describes the image. Search engines read alt text to understand images. Keyword stuffing does not help: it makes the announcement worse for screen reader users and weaker as a description.

What alt text does a linked logo need?

The destination or function, not a description of the logo artwork. A logo linking to the homepage can use alt text naming the homepage. If the logo appears as a plain image with no link, describe it as an informative image.

Sources

Check your own site

See what is actually wrong with your site.

Free, 60 second WCAG 2.2 AA scan. No credit card required.

Scope of every report we ship: SCOPE LIMITATION: This report documents violations identified by automated WCAG 2.2 AA scanning using axe-core v4.11.0. Automated tools cannot test every WCAG criterion; many criteria require manual review. This report does not constitute legal advice, guarantee ADA compliance, or protect against legal action. ADA compliance is a legal determination made by courts. For full WCAG conformance assessment, engage an IAAP-certified accessibility professional.