Skip to main content
Raasta
SeriousWCAG 1.1.1 · Level Asvg-img-alt

Image made with SVG has no text alternative

An inline <svg role="img"> without a title or label is announced as an unnamed image. Add aria-label or a <title>, or mark it aria-hidden="true" if it is decorative.

Who it hurts

Screen reader users.

Logos, charts and rating stars drawn in SVG are the usual cases.

How to fix it

Pick your stack. Review every change before you ship it.

Before

<svg role="img" viewBox="0 0 80 16">…</svg>

After

<svg role="img" aria-label="Rated 4 out of 5" viewBox="0 0 80 16">…</svg>

Check it by hand too

Decide for each SVG whether it carries meaning. Rating stars should say “4 out of 5 stars”.

Automated checks find a large share of accessibility problems, but not all of them. Passing this check does not on its own make a page compliant.

WCAG reference