NeovaPlateforme SEO avancée

Image SVG sans texte accessible

Dans Neova S'exécute à partir du crawl lui-même : rien à configurer.

Règle revue le 17 octobre 2026 · Guide mis à jour le 7 juillet 2026

Le critère WCAG 1.1.1 exige une alternative textuelle. Un SVG exposé comme image et sans texte ne donne rien à lire aux utilisateurs de lecteurs d'écran.

Ce que vous pouvez faire

Ajoutez un élément title non vide comme premier enfant du svg, ou un aria-label.

Pourquoi Neova le signale

  • Un SVG inline exposé comme image sans texte ne donne rien à lire aux utilisateurs de lecteurs d'écran.
  • Le critère WCAG 1.1.1 (niveau A) exige une alternative textuelle pour les images porteuses de sens.
  • Les logos et icônes dessinés en SVG sont les cas habituels.

Sources

Le guide complet

Cette partie est en anglais pour l'instant.

Svg images and graphics require accessible text: how to fix it
TL;DR

An inline <svg> that carries meaning needs role="img" plus a name from <title> or aria-label. A purely decorative one should be hidden with aria-hidden="true".

This check flags an inline <svg> that conveys meaning but exposes no accessible text, so a screen reader either skips it or dumps raw path data. That means the padlock next to your secure-checkout copy, or the chart summarizing your pricing, simply does not exist for a blind user. Because inline SVG icons often carry the only label on a control, a nameless one can also strip the accessible name off a button or link, which is where the accessibility gap starts costing you conversions.

Why Inline SVG Is Its Own Problem

A raster image loaded through <img> has one obvious slot for alternative text, the alt attribute, and everyone knows to fill it. Inline SVG has no alt. It is a live chunk of the DOM made of shapes, and how a screen reader treats it depends on the role and attributes you give the root element. Left alone, an inline SVG is ambiguous: some assistive tech ignores it, some announces it as a graphic with no name, and some has historically read out the text nodes buried in the markup, which can be nonsense. The result is that a meaningful icon, the thing telling a user a field is required, a message is an error, or a link opens in a new window, silently vanishes. The flip side is just as common and just as damaging: decorative flourishes that were never meant to be announced end up cluttering the audio experience because nobody told the screen reader to skip them. Getting this right is a two-part decision, and the first part is honest triage of which SVGs actually carry meaning.

A Real Failure, and the Fix

A "download" icon button ships the graphic but no text at all, so it announces as an empty button:

<button>
  <svg viewBox="0 0 24 24">
    <path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14"/>
  </svg>
</button>

Give the SVG a role and a title, and reference that title so its name is exposed reliably:

<button>
  <svg viewBox="0 0 24 24" role="img" aria-labelledby="dl-title">
    <title id="dl-title">Download report</title>
    <path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14"/>
  </svg>
</button>

Now the button announces "Download report, button." If the icon is purely decorative, do the opposite and mark it aria-hidden="true" with a focusable="false" so assistive tech ignores it cleanly.

Meaningful vs Decorative: Pick a Lane

SVG Plays This Role Example What to Add
Standalone meaning A chart, a logo, a status icon role="img" + <title> or aria-label
Only label on a control Icon-only button or link Name the control (icon named or button labeled)
Redundant with adjacent text Cart icon beside the word "Cart" aria-hidden="true" + focusable="false"
Pure decoration Background flourish, divider aria-hidden="true"

How to Detect It

  1. axe DevTools: run the scan and look for "SVG elements with an img role must have an alternative text," which lists each graphic missing a name.
  2. Lighthouse: run the Accessibility audit; unnamed image-role SVGs surface under the ARIA and image-alternative-text results.
  3. WAVE: load WAVE and check for missing alternative-text alerts on inline graphics and icon controls.
  4. Manual check: tab to icon-only buttons and links with a screen reader; if one announces as "button" with no name, its SVG is the missing text.

How to Fix It

First decide whether the SVG means anything on its own. If it does, add role="img" and give it a name, either a <title> referenced by aria-labelledby or a direct aria-label, and keep that text short and descriptive of purpose, not shape. If the graphic is decorative or duplicates nearby text, hide it with aria-hidden="true" and set focusable="false" so older browsers do not place it in the tab order. When the SVG is the sole content of a button or link, naming the control is often cleaner than naming the icon. The same alternative-text logic covers role=img elements need alternative text and icon-only controls in links must have discernible text.

Frequently Asked Questions

Is a <title> Alone Enough?

A <title> helps, but support has historically been uneven, so pair it with role="img" and reference it via aria-labelledby, or use aria-label instead. That combination is announced reliably across screen readers.

What About an SVG Loaded Through an <img> Tag?

When an SVG is referenced with <img src="icon.svg">, it follows normal image rules; give it an accurate alt attribute. This check is specifically about inline <svg> markup in the DOM.

Should Decorative Icons Get Empty Alt Text?

For inline SVG there is no alt attribute, so hide decoration with aria-hidden="true". Empty alt="" is the equivalent technique only for raster images loaded via <img>.

Why Add focusable="false"?

Some legacy browsers place inline SVGs in the tab order by default. Setting focusable="false" keeps a decorative or already-labeled graphic from stealing a stop, which keeps keyboard navigation tidy.

How Long Should the SVG Name Be?

Long enough to convey purpose, short enough to say quickly. Name the function, "Download report," "Verified account," not the drawing, and skip words like "icon" or "image" since the role already tells the user it is a graphic. For a complex graphic such as a chart, name it briefly and put the full detail in adjacent body text linked with aria-describedby.

Need a full technical audit?

Neova runs deep crawls that catch issues like this across your whole site.

Trouvez ce problème sur votre site

Neova lance ce check et tous les autres à chaque crawl, puis rédige la correction sous forme de ticket pour votre équipe.

  • Application de bureau pour Mac, Windows et Linux
  • Les 696 checks, chacun avec sa source
  • Search Console et Analytics 4, connectés en lecture seule
  • Tickets vers Jira, Linear et Asana

Télécharger Neova Offre Desktop Free, ou Solo gratuit pendant 14 jours, sans carte.

Tous les checks de la catégorie Accessibilité · Guides · Bibliothèque des checks

Rédigé par Neova Labs · Retour à la Bibliothèque des checks