Bought Pro? It is on your account. Sign in
SVG Creator Go Pro

Accessible SVG icons

By · Updated · 2 min read

Short answerHide decorative icons with aria-hidden="true". Give icon-only buttons and links an accessible name with aria-label or visually hidden text. Standalone meaningful icons get role="img" and aria-label. Meaningful icons need 3:1 contrast, and touch targets should be at least 24×24 CSS pixels.

Decide: decorative or meaningful?

Most icons sit next to a text label ("Settings", "Download"). They are decorative: the text already says everything, and a screen reader announcing the icon too is noise. Icons that appear without text (an icon-only button, a status dot) carry meaning and need an accessible name.

Decorative icons: hide them

<button type="button">
  <svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" width="20" height="20">…</svg>
  Download
</button>

aria-hidden="true" removes the icon from the accessibility tree. focusable="false" is only needed for old Internet Explorer and Edge, but is harmless. For <img> icons, use an empty alt="".

Icon-only buttons and links: name the control

<button type="button" aria-label="Search">
  <svg aria-hidden="true" viewBox="0 0 24 24" width="20" height="20">…</svg>
</button>

Put the name on the button, not the SVG, so it works with every screen reader. A visually hidden <span> with the label is equally good and also translates with the page. A title tooltip alone is not a reliable accessible name.

Standalone meaningful icons

<svg role="img" aria-label="Payment verified" viewBox="0 0 24 24" width="24" height="24">…</svg>

Use role="img" with aria-label (or a <title> referenced by aria-labelledby) when an icon conveys information on its own. Describe the meaning ("Payment verified"), not the drawing ("green shield").

Contrast and size

Frequently asked questions

Should SVG icons have alt text?

Only if they carry meaning on their own. Decorative icons next to text should be hidden with aria-hidden="true" (inline SVG) or alt="" (img).

Is the <title> element enough to label an SVG?

Not on its own in every browser and screen reader. Use role="img" with aria-label, or reference the <title> with aria-labelledby.

What contrast do icons need?

Meaningful icons need at least 3:1 against the background under WCAG 1.4.11. Decorative icons have no contrast requirement.

Related guides

Free icons to try it with

Make an icon for your project

Type a few words, pick a style, export SVG, PNG, React or CSS.
Try SVG Creator free