Skip to content
Performance & Accessibility

How to Get Accessible SVG Right

Making inline SVG graphics work for screen reader users, whether they are decorative or meaningful.

Marcus Adeyemi Technical Director 2 min read 20 views
How to Get Accessible SVG Right

Where most projects go wrong

The usual mistakes:

  • Icon-only buttons with no names
  • Titles that repeat adjacent text
  • Complex charts with no text alternative
  • Low-contrast interface icons

What good looks like instead

  • Hide decorative SVGs with aria-hidden
  • Give meaningful SVGs role and accessible names
  • Describe complex graphics in nearby text
  • Check icon contrast
  • Test icons with screen readers
What to do and what to avoid with accessible SVG, side by side
Good practice against the usual mistakes, from the sources listed below.

Why it matters

SVG is increasingly used for icons, charts and illustrations, and its accessibility depends on how it is marked up.

The specs that matter

Published figures for Accessible SVG
MeasureFigure
Decorative graphicsshould be hidden from assistive technology
Meaningful graphicsneed an accessible name
Title elementsan SVG title can provide a name
Contrasticons that convey meaning need sufficient contrast

Knowing when to hand it over

Tip: Bring in help when icon systems or charts must be accessible.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Performance & Accessibility work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Performance & Accessibility