Skip to content

Rule · Accessibility

SVG image has no text alternative

a11y/svg-img-alterrorvoid a11yupdated

Why it matters

An <svg role="img"> with no accessible name is announced as an unlabeled image, so the information in the graphic is lost.

How to fix it

Add a <title> as the first child of the SVG, or aria-label. For decorative icons use aria-hidden="true" instead of role="img".

Example

tsx
<svg role="img" aria-label="Revenue grew 40% in 2026">…</svg>

References

void a11y reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.