Accessible SVG Icons (roles, labels, when to hide)

Making SVG icons accessible with ARIA roles and labels

In this guide you’ll learn when an SVG icon should be hidden from assistive tech versus announced with a label, how to apply ARIA roles and labels, and how to add SVG <title>/<desc> for accessible names. You’ll also see how to export clean, themable SVGs from Axialis IconVectors that drop right into accessible markup.

Decorative vs informative icons

Export a clean, themable SVG from IconVectors

  1. Open or create your icon:
    • File → Open… (Ctrl+O) or New Icon (Ctrl+N).
    • Prefer a simple path‑based icon; set fills/strokes to currentColor for easy theming.
    Preparing an SVG icon in IconVectors
    Export a minified SVG via File → Export → Export Minified (Shift+Ctrl+M). Use View → Source Code (F3) to verify viewBox and currentColor.

Pattern 1 — Decorative SVG (hide from AT)

For purely visual icons, remove them from the accessibility tree so screen readers don’t announce noise.

<!-- Decorative icon next to text -->
<p>
  <svg aria-hidden="true" focusable="false" width="16" height="16" viewBox="0 0 24 24">
    <path d="M4 12 9 17 20 6" fill="none" stroke="currentColor" stroke-width="2"/>
  </svg>
  Settings updated
</p>

Pattern 2 — Informative inline SVG with role & label

When the icon conveys meaning, give it an accessible name (short) and an optional long description.

<!-- Informative icon announced as "Warning" -->
<svg role="img" aria-labelledby="warn-title warn-desc" width="20" height="20"
     viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  <title id="warn-title">Warning</title>
  <desc id="warn-desc">Triangle with exclamation mark</desc>
  <path d="M12 3 2 21h20L12 3zm0 6v6m0 4h.01" fill="none" stroke="currentColor" stroke-width="2"/>
</svg>

Pattern 3 — Icon‑only buttons/links

Interactive controls need an accessible name. Put the label on the button/link and hide the icon.

<button type="button" aria-label="Close dialog" class="icon-btn">
  <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 24 24">
    <path d="M6 6 18 18M6 18 18 6" fill="none" stroke="currentColor" stroke-width="2"/>
  </svg>
</button>

Pattern 4 — External SVG files via <img>

When using <img src="icon.svg">, supply the meaning using alt. Use an empty alt for decorative images.

<!-- Informative: announced as "Download" -->
<img src="/icons/download.svg" width="20" height="20" alt="Download">

<!-- Decorative: ignored by AT -->
<img src="/icons/starburst.svg" width="20" height="20" alt="">

Pattern 5 — SVG sprites with <use>

For sprite references, the <svg> wrapper gets the ARIA.

<!-- Decorative sprite use -->
<svg aria-hidden="true" focusable="false" class="icon"><use href="#icon-check" /></svg>

<!-- Informative sprite use -->
<svg role="img" aria-label="New notifications" class="icon"><use href="#icon-bell" /></svg>

Keyboard focus rules (quick recap)

Checklist

Start Making SVG Icons Today with IconVectors

Download the fully-functional 30‑Day Free Trial and unlock your icon design workflow.

Version 1.10 - September 17, 2025