
Accessible SVG Icons: Decorative vs Meaningful
Decide per use whether an icon is decorative or meaningful. Hide the first with aria-hidden, name the second (on its control, or on the SVG when it stands alone), and never ship an unnamed icon-only button.
TL;DR: Icon accessibility comes down to one decision per use: is this icon decorative, repeating what visible text already says, or meaningful, carrying information nothing else on screen conveys? Decorative icons get aria-hidden="true" so screen readers skip them. Meaningful icons need an accessible name — usually aria-label on the control that contains them — and the SVG <title> element has historically been an inconsistent way to provide one, so do not rely on it alone. This guide covers the governing decision, the hiding and naming patterns, the icon-only button, the focusable and contrast details, and a reference table mapping each case to its attributes.
The one decision that governs the rest
Every icon in an interface falls into one of two categories, and the category is decided by how it is used, not by how it is drawn.
A decorative icon is redundant with adjacent text. The trash can beside the word "Delete," the gear beside "Settings," the arrow after "Read more" — each reinforces a label that is already there. Removing the icon would remove nothing a screen-reader user needs.
A meaningful icon carries information that no visible text repeats. The magnifying glass that is the only content of a search button, the warning triangle that is the only indication a field has an error, the external-link glyph that is the only signal a link opens a new site — remove any of these and something is lost.
Getting the category wrong fails in one of two directions. Treat a decorative icon as meaningful and give it a name, and screen readers announce the information twice, for example "trash can, Delete, button." Treat a meaningful icon as decorative and hide it, or simply leave it unnamed, and the meaning disappears for anyone not looking at the screen: for example, a button announced as just "button."
The practical consequence is reassuring. An icon that sits beside a text label repeating what it says is decorative, and the decorative case is the easy one. The trap is the icon-only control, where the icon is the label — and where an unnamed control is the failure to look for.
Hiding decorative icons
A decorative icon should be visible on screen and absent from the accessibility tree. One attribute does that:
<button type="button">
<svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
<path fill="currentColor" d="..."/>
</svg>
Delete
</button>With aria-hidden="true" on the SVG (or on a wrapper element around it), assistive technology skips the icon entirely. The button is announced from its text — "Delete, button" — exactly once.
It is tempting to label every icon "for accessibility," and it is usually wrong for an icon whose meaning the visible text already gives. A label on the icon does not add information; it adds noise: when the control's name comes from its content, as a button's does here, the accessible name computation includes the icon's label in that name alongside the visible text. When text already says what the icon says, hiding the icon is the accessible choice.
Decorative is also the right default for an icon component or build. If the icon component renders aria-hidden="true" unless a name is explicitly passed, call sites cannot forget to hide decorative icons, and the decision that remains for the developer is the deliberate one: this icon carries meaning, so here is its name. A system that makes every call site decide from scratch will get the decorative case wrong some of the time.
The same logic covers icons delivered as CSS background images, which are not exposed to assistive technology as content — fine for decoration, a problem for meaning: a meaningful icon drawn that way needs a text name on the control. Pseudo-element content is different: generated text is included when a control's name is computed from its content, and the content property accepts alternative text (content: url(icon.svg) / "Warning"), supported from Chrome 77, Edge 79, Firefox 128 and Safari 17.4 (MDN browser-compat-data, as of Nov 2026), so check what a pseudo-element icon actually contributes to the name. When a review finds a meaningful icon implemented as a background image, the fix is usually to move the meaning into the control's name rather than to change how the icon is drawn.
Naming meaningful icons
A meaningful icon needs an accessible name, and there are two reliable ways to give it one.
When the icon sits inside an interactive element — a button or a link — put the name on the element and hide the icon. The control is what a screen-reader user interacts with, so the control is what should be named:
<a href="/help" aria-label="Help">
<svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
<path fill="currentColor" d="..."/>
</svg>
</a>When the icon is a standalone, non-interactive image that carries meaning — a status indicator in a table cell, say — give the SVG itself an image role and a label. The img role tells assistive technology to treat the element as a single graphic rather than a group of shapes, and aria-label supplies its name (MDN, accessed October 2026):
<svg role="img" aria-label="Overdue" viewBox="0 0 24 24" width="16" height="16">
<path fill="currentColor" d="..."/>
</svg>The SVG <title> element is another option, and it deserves an honest limit. A <title> child can contribute to an SVG's accessible name, and it often produces a hover tooltip, but its support as a naming mechanism has historically been inconsistent across browser and screen-reader combinations: Sara Soueidan's May 2019 article on accessible icon buttons advises against labeling an SVG through aria-labelledby pointing to its <title>, because that technique fails in some browser and screen-reader combinations. The CSS-Tricks article on accessible SVG icons (Chris Coyier, December 2020, accessed October 2026) is more optimistic: it recommends the <title> pattern for a standalone icon, including one inside a <button>, and says that is all modern browsers need, while in its comments Sara Soueidan advises against using <title> inside a button and another commenter suggests aria-label on the link instead. Treat <title> as a supplement — a tooltip, a fallback — not as the mechanism the name depends on. And if a set's source files ship with <title> elements left over from a design tool, the build should strip them or make them deliberate, because stray titles become stray announcements.
Whatever mechanism carries the name, the name should describe the meaning or action, not the picture. "Search," not "Magnifying glass." "Close dialog," not "X." "Opens in a new tab," not "Arrow pointing out of a box." The screen-reader user needs to know what happens, not what the drawing looks like.
Two practical consequences follow from naming by meaning. First, names are user-facing text and need translation like any other string; an aria-label hardcoded in English inside a shared icon component will be announced in English on every localized page, so names belong to the call site or to the translation system, not to the icon. Second, a toggle whose icon changes — a play icon that becomes pause — should keep a stable name and expose its state separately, for example with aria-pressed, or change the name to match the action it will now perform. What it should not do is leave the old name in place while the picture changes.
Icon-only buttons: the pattern to check first
An icon-only button with no accessible name is an unlabeled control. A screen reader announces it as "button" and nothing else, and a voice-control user has no word to say to activate it. It is an easy failure to ship, because the button looks perfectly clear to the sighted person who built it.
The reliable pattern has three parts: a real <button> element, an accessible name on that button, and the icon hidden inside it.
<button type="button" aria-label="Close dialog">
<svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
<path fill="currentColor" d="..."/>
</svg>
</button>Visually hidden text inside the button works equally well and has one advantage: it is ordinary text, so it goes through page translation with the rest of the content; check whether the translation tools your users rely on also translate attribute values such as aria-label.
<button type="button">
<svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
<path fill="currentColor" d="..."/>
</svg>
<span class="visually-hidden">Close dialog</span>
</button>The real button matters as much as the name. A clickable <div> or a bare SVG with a click handler is not focusable by keyboard, does not respond to Enter and Space, and does not announce itself as a button — naming it fixes none of that.
A hover tooltip is not a substitute. A tooltip that appears on mouse hover is invisible to keyboard users who never hover and to screen-reader users who never see it, and a title attribute tooltip is not reliably exposed by assistive technology either. Tooltips help sighted mouse users learn what an unfamiliar icon means; a title attribute is only a last-resort source of the accessible name, and the HTML Standard discourages relying on it. The button needs its name regardless.
The focusable and rendering gotchas
One legacy quirk explains an attribute that still appears in many icon sets. Per the ally.js focus tutorial (accessed October 2026), Internet Explorer and Microsoft Edge up to version 13 treated inline <svg> elements as keyboard-focusable by default, adding unexpected tab stops, and Edge did not support tabindex on SVG before version 14. Adding focusable="false" removed those stops. The attribute comes from the SVG Tiny 1.2 specification (a W3C Recommendation from 2008; SVG 2 instead defines focus the same way as HTML, including the tabindex attribute) and matters only for those legacy browsers; current engines do not need it. Keeping it in generated icons is harmless, and if your support matrix still includes Internet Explorer or Edge 13 and earlier, it is required. The build is the place to decide once.
Contrast still applies to meaningful icons. An icon that carries information has to be perceivable, and the WCAG 2.1 non-text contrast criterion (Success Criterion 1.4.11, Level AA, accessed October 2026) asks for a contrast ratio of at least 3:1 against adjacent colors for parts of graphics required to understand the content, except when a particular presentation of graphics is essential to the information being conveyed. Its other branch sets the same ratio for the visual information required to identify user interface components and states, except for inactive components or where the appearance is determined by the user agent and not modified by the author. A pale-gray status icon on a white row fails the graphics requirement whatever its accessible name says. Decorative icons are not held to it, which is one more reason to decide the category deliberately.
The whole decision fits in one reference table:
| Situation | Category | Attributes |
|---|---|---|
| Icon beside visible text in a button or link | Decorative | aria-hidden="true" on the SVG |
| Icon purely ornamental, no interaction | Decorative | aria-hidden="true" on the SVG |
| Icon-only button | Meaningful | Real <button> with aria-label or visually hidden text; aria-hidden="true" on the SVG |
| Icon-only link | Meaningful | aria-label or visually hidden text on the <a>; aria-hidden="true" on the SVG |
| Standalone icon that conveys status or meaning | Meaningful | role="img" and aria-label on the SVG; at least 3:1 non-text contrast against adjacent colors (SC 1.4.11), except when a particular presentation of graphics is essential to the information being conveyed |
| Any inline SVG where IE or Edge 13 and earlier is supported | Either | Add focusable="false" |
Run the table at the component level, not the page level. When the icon component encodes the decorative default and requires a name for the meaningful cases, the decision is made once for the whole set — which is what turns accessibility from a review finding into a property of the system.