Check 11.05 · Semantic HTML and accessibility

Provide ALT text for informative images

Write the alternative text for informative images, image links and charts, then enter it in WordPress, Shopify or your code.

Priority
Important
Difficulty
Easy
Estimated time
30 min to 2 days
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

An informative image conveys something the page text does not already say: a product photo, a diagram, a chart, a screenshot, a logo inside a link, embedded text. Its alt attribute must render that information in words for people who cannot see the image. The check consists of listing these images, writing accurate alternative text for each one and saving it in the right place in your CMS or code. Expected result: no informative image without alt, and each alt replaces the image with no loss of information.

Why it matters

A screen reader reads the alternative text in place of the image. Without alt, it often announces the file name (“IMG_4521 dot jpg”); with a vague alt (“image”, “photo”), the user learns nothing. The information carried by the image is lost.

Search engines use it too. Google says it uses alternative text, along with computer vision and the page content, to understand what an image is about, and uses the alt of an image placed in a link as that link's anchor text. Microsoft Bing recommends providing alternative text or repeating important information in HTML, because AI reading of text in images remains less reliable.

For generative engines, a chart with no alternative text and no commentary on the page is invisible data: the conclusion the curve shows does not exist as text, so it cannot be reused or attributed.

What it improves

  • Accessibility Blind and visually impaired people get access to the information. WCAG criterion 1.1.1 (Non-text Content), RGAA (French accessibility framework) criteria 1.1 and 1.3.
  • Image search A signal that helps Google Images and Bing Images understand the image, among others (context, file name, caption).
  • Internal linking The alt of an image link serves as anchor text.
  • Generative engines Visual information becomes usable text. An indirect effect, with no guarantee of citation.
  • Fallback The text is displayed when the image fails to load.

How to check

1. List the images and their alternative text. In the developer tools console:

console.table([...document.querySelectorAll('img, [role="img"], svg')].map((el) => ({
  type: el.tagName.toLowerCase(),
  fichier: (el.currentSrc || el.getAttribute('src') || '').split('/').pop().slice(0, 40),
  alt: el.hasAttribute('alt') ? el.getAttribute('alt') : '(MISSING)',
  aria: el.getAttribute('aria-label') || el.querySelector?.('title')?.textContent || '',
  dansLien: Boolean(el.closest('a, button')),
})));

Deal first with: (MISSING) rows, images inside a link with an empty alt and no other text, and alt values that repeat the file name or contain “image of”.

2. Across the whole site. Screaming Frog lists images with no alt attribute and with no alternative text in the Images tab (“Missing Alt Text” and “Missing Alt Attribute” filters). Lighthouse, axe DevTools and WAVE flag images without alt page by page.

3. Judge the quality. No tool can tell whether an alt is accurate. Read the page without the images (WAVE can replace them with their alternative text): the meaning should remain complete.

How to implement

Before you start

Start by classifying the image. The W3C's alt decision tree is the reference; in summary:

Image type Alternative text
Product photo what sets the product apart: model, color, view (“Oslo chair in light oak, side view”)
Image alone inside a link or button the destination or the action (“Atelier Martin home”, “Print”)
Logo on its own the organization's name, plus the destination if it is clickable
Image containing text the text, word for word
Chart, diagram the conclusion in one sentence, with detailed data in the text or a table
Interface screenshot what the reader needs to see in it (“Settings menu open, Privacy option highlighted”)
Illustrative photo that conveys information the part of the scene relevant to the point being made
Purely decorative image alt="": see use empty ALT for decorative images (opens in a new tab)

Writing rules:

  • Context first: the same photo of a team does not get the same alt on an “Our team” page and on an “Our offices” page.
  • Concision: one sentence, often under 125 characters. No standard sets a limit; longer information goes in the text or the caption.
  • No “image of”, “photo of”: the screen reader already announces “image”. Only specify when the nature matters (“Screenshot”, “Illustration”).
  • No repetition: if the caption or the neighboring paragraph already says it all, do not repeat it in the alt.
  • No keyword lists: Google states that stuffing alternative text degrades the user experience and may cause the site to be seen as spam. See write relevant ALT text without keyword stuffing (opens in a new tab).

Examples:

<img src="/images/chaise-oslo-chene-profil.webp"
     alt="Oslo chair in light oak, woven rope seat, side view"
     width="800" height="800">

<a href="/"><img src="/logo.svg" alt="Atelier Martin, back to home" width="160" height="40"></a>

<figure>
  <img src="/images/ventes-2026.png"
       alt="Online sales doubled between January and October 2026"
       width="800" height="400">
  <figcaption>Monthly sales in 2026; detailed data in the table below.</figcaption>
</figure>

For an SVG embedded in the page, give it an image role and a title, which Google also recommends for inline SVG:

<svg role="img" aria-labelledby="titre-carte" viewBox="0 0 400 300">
  <title id="titre-carte">Map of the 3 branches: Lyon, Nantes and Lille</title>
  …
</svg>

Information carried by a CSS background image cannot have alternative text, and Google does not index CSS images: if the image is informative, switch it to an <img>.

Tip: for a catalog, build the alt from structured fields (name, color, material, view) rather than writing it by hand for each photo, then proofread the main images.

WordPress

Versions WordPress 6.4 and later, WooCommerce 9 and later.

  • Media Library: Media > Library, click the image, “Alternative Text” field. This value is used by default every time you insert the image.
  • Image block: right-hand panel, “Settings” tab, “Alternative text” field. Since WordPress 7.1, do not tick “Mark as decorative” for an informative image: that checkbox empties the alternative text. The value entered here applies only to this page and takes precedence over the one in the library: adapt it to the context.
  • Featured image: its alt comes from the Media Library; fill it in there.
  • Theme: check that templates display images with wp_get_attachment_image() or the_post_thumbnail(), which use the saved alt, rather than a hand-written <img> tag without alt.
  • WooCommerce: product and gallery photos take the alt from the Media Library.

For a bulk audit, the library's list view helps you find media, and some plugins display images with no alternative text. Be wary of plugins that automatically fill the alt with the file title: you end up with alt attributes that are present but useless.

Shopify

Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.

  • Product photos: Products, open the product, click an image in the Media section, then Add alt text, type it and save. Shopify accepts up to 512 characters but recommends 125 at most.
  • Files: images in Content > Files used in theme sections also have editable alternative text; fill it in for banners that convey information.
  • Theme: the Liquid image_tag filter uses the media's alternative text by default, or failing that the resource title. To force a specific text:
{{ product.featured_media | image_url: width: 800 | image_tag: alt: product.featured_media.alt, loading: 'lazy' }}

{{ section.settings.image | image_url: width: 1200 | image_tag: alt: section.settings.image.alt }}

A theme that writes <img src="{{ … }}"> by hand without alt needs fixing.

Wix

Versions Wix Editor and Wix Studio, November 2026.

Select the image, open its settings and fill in the alternative text field (“What's in the image? Tell Google” or an equivalent label depending on the editor). For galleries, alternative text is set image by image in the gallery manager. The exact labels depend on the editor (Wix Editor or Wix Studio); refer to the Wix help center.

Squarespace

Versions Squarespace 7.1, November 2026.

  • Image block: edit the page, click the block and then its pencil icon; in the Content tab, fill in the “Image alt text” field.
  • Product images: on the store page, hover over the image, … menu, Edit metadata, “Alt text” field (200 characters at most). If left blank, the product name is used.
  • Galleries: the alternative text comes from the image description (Gallery sections) or its title (Gallery blocks).
  • For most other images with no alternative text, Squarespace uses the file name: give your files descriptive names before uploading.

Webflow

Versions Webflow Designer, November 2026.

Alternative text is set in the Assets panel (image settings, value reused wherever the image appears) or in the Image element's Settings for text specific to that placement. For CMS collection images, add a dedicated text field to the collection and bind it to the image's alt attribute in the template.

PrestaShop

Versions PrestaShop 8 and 9, Classic and Hummingbird themes.

On the product page, open an image: the caption field, translatable per language, is used as alternative text by most themes. Check the HTML your theme outputs, as some use the product name instead.

Laravel

Versions Laravel 11 to 13; spatie/laravel-medialibrary 11 optional.

Store the alternative text with the image (an alt column in the media table, or a custom property with spatie/laravel-medialibrary), translatable if the site is multilingual, and always render it:

<img src="{{ $media->getUrl('large') }}"
     alt="{{ $media->getCustomProperty('alt', '') }}"
     width="{{ $media->getCustomProperty('width') }}"
     height="{{ $media->getCustomProperty('height') }}">

Make the field required in the admin form for content images, with a “decorative image” checkbox that explicitly saves an empty value.

Next.js

Versions Next.js 15 and 16 (App Router and Pages Router).

The Image component from next/image requires the alt property. Take it from the data rather than from hard-coded text:

import Image from 'next/image';

<Image src={produit.image.url} alt={produit.image.alt} width={800} height={800} />

With a headless CMS, make the alternative text field required in the content model, and type it as a non-optional string so that an omission is flagged at compile time.

Astro

Versions Astro 5 to 7.

The Image component from astro:assets also requires alt. For images declared in the front matter of content collections, add an alt field to the schema and make it required.

Common mistakes

  • alt equal to the file name or the page title on every image: present for audits, useless for readers.
  • Image link with alt="" and no other text: the link no longer has a name and is announced by its URL.
  • A chart described as “Sales chart”: the information (the trend, the key figures) is missing.
  • Important text only in an image (promotional banner, terms): repeat it in HTML. See avoid information available only in images or videos (opens in a new tab).
  • Using title instead of alt: the title attribute replaces it neither for screen readers nor for search engines.
  • Not translating alt text on a multilingual site: the English version keeps French alternative text.

Frequently asked questions

How long should alternative text be?

No standard sets a maximum length for the alt attribute. Aim for one sentence that conveys the useful information, often under 125 characters, a benchmark Shopify also recommends. If the image carries more information, such as a detailed chart or a diagram, keep a short alt that gives the conclusion and put the details in the page text, a caption or a table.

Does alternative text help SEO?

Yes, to a certain extent. Google says it uses alternative text, along with computer vision and the page content, to understand what an image is about, which matters mostly for Google Images. The alt of an image placed in a link also serves as anchor text. Stuffing the alt with keywords, on the other hand, is discouraged and may cause the site to be seen as spam.

Should a logo have alternative text?

Yes, when the logo is informative: its alternative text is the organization's name. If the logo links to the homepage, the alt should also name the destination, for example “Atelier Martin, back to home”. If the organization's name already appears as text right next to the logo, inside the same link, the logo can get an empty alt to avoid repetition.

Do generative engines read image alternative text?

Generative engines that rely on the page's HTML have access to alternative text, just like search engines. Microsoft Bing explicitly recommends providing alternative text or presenting key information in HTML, because reading text in images remains less reliable. A precise alt guarantees no citation, but information missing from the text cannot be reused.

Updated on

Topic checklist (PDF)

And now?

In the “Semantic HTML and accessibility” topic

  1. Use header, main, nav, article and footer appropriately
  2. Use elements suited to the content
  3. Structure tables and lists with native elements
  4. Distinguish action buttons from navigation links
  5. Provide ALT text for informative images
  6. Use empty ALT for decorative images
  7. Check color contrast
  8. Test keyboard navigation
  9. Check form labels
  10. Use ARIA when necessary
  11. Check DOM reading order
  12. Avoid information available only on hover
  13. Provide text alternatives for media
  14. Check applicable WCAG guidelines
  15. Test with axe, WAVE or Lighthouse