Accessible Icons: How to Make Icons Everyone Can Use

What makes an icon accessible?

An accessible icon is one that every user can see, understand and operate, including people who use screen readers. It needs a text name when it carries meaning, a contrast ratio of at least 3:1 against its background, and a tap target of at least 24 by 24 CSS pixels under WCAG 2.2.

I once turned on VoiceOver and tabbed through a dashboard I had designed. The screen reader said "button" four times in a row. No names, just "button". Those were my beautiful icon-only buttons, and to a blind user they were four mystery boxes.

Here's the good news. Accessible icons take a few small habits, not a redesign. Let me walk you through them one by one, with the actual rules and code.

Why do accessible icons matter?

Accessible icons matter because a large share of people rely on screen readers, zoom, high contrast or careful tapping. An icon that only works for perfect eyesight and steady hands shuts those people out.

According to the World Health Organization's World Report on Vision, at least 2.2 billion people worldwide have a near or distance vision impairment. Colour vision deficiency affects about 1 in 12 men and 1 in 200 women, according to the UK's NHS.

The problem is common on the web, too. WebAIM's yearly Million report checks the home pages of the top one million websites. In recent years it has found detectable WCAG failures on more than 94% of them, and empty buttons and empty links keep showing up in its list of the most common errors. An unnamed icon button is exactly that.

WCAG stands for Web Content Accessibility Guidelines. The W3C publishes them, and version 2.2 became an official recommendation in October 2023. Many accessibility laws point to WCAG as the standard to meet.

Decorative or meaningful: which kind is your icon?

Every icon is either decorative or meaningful, and the two need opposite treatment. A decorative icon repeats nearby text, so hide it. A meaningful icon carries information on its own, so give it a name.

WCAG success criterion 1.1.1, Non-text Content, asks for a text alternative for meaningful images and wants decorative ones ignored by assistive technology. Here's how that looks in practice:

ExampleTypeWhat to do
Trash icon next to the word "Delete"DecorativeHide it with aria-hidden="true"
Icon-only trash buttonMeaningfulName the button with aria-label="Delete"
Warning icon beside a form fieldMeaningfulGive the icon a title or add visible text
Star icons in a feature listDecorativeHide them

How do you label an icon-only button?

You label an icon-only button by putting the name on the button, not the icon. Add aria-label to the button and hide the SVG inside it with aria-hidden="true".

HTML
<button type="button" aria-label="Close">
  <svg width="20" height="20" viewBox="0 0 24 24" aria-hidden="true" focusable="false">...</svg>
</button>

With a component package, it is even shorter. fmicon-react, fmicon-vue and fmicon-svelte hide icons by default, so you only name the button:

React
<button aria-label="Close"><CloseCircle /></button>

// A standalone icon that carries meaning
<Warning2 title="Warning" />

Keep labels short and action-based: "Close", "Search", "Open menu". Skip words like "icon" or "button", because the screen reader already announces the role. The React icons guide shows more patterns.

How much contrast does an icon need?

A meaningful icon needs a contrast ratio of at least 3:1 against its background. That rule comes from WCAG 2.1 success criterion 1.4.11, Non-text Contrast, at level AA.

Text has a stricter rule of 4.5:1 for normal sizes. Icons get 3:1 because they are usually bolder shapes. In practice, light grey icons on a white background are the classic failure. A grey like #767676 on white passes, while a pale #c4c4c4 does not.

Thin strokes make this harder, because there is less ink to see. If an icon looks faint at 16 px, try a bold or bulk style, or raise the stroke width. You can test both live on any icon page, like the eye icon.

How big should icons and tap targets be?

The clickable area around an icon should be at least 24 by 24 CSS pixels under WCAG 2.2, and 44 by 44 or larger is better on touch screens. The icon itself can stay smaller inside that area.

WCAG 2.2 added success criterion 2.5.8, Target Size (Minimum), at level AA, which sets the 24 px floor. Its stricter cousin, 2.5.5, asks for 44 by 44 px at level AAA. Platform guidelines agree on similar sizes:

  • Apple's Human Interface Guidelines recommend touch targets of at least 44 by 44 points.
  • Google's Material Design recommends at least 48 by 48 dp, which is about 9 mm (0.35 inches) on screen.

A simple pattern: draw a 20 or 24 px icon, then give the button padding so the whole hit area reaches 40 to 48 px.

CSS
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}

Why shouldn't icons rely on colour alone?

Icons should not rely on colour alone because many people cannot tell certain colours apart. WCAG success criterion 1.4.1, Use of Color, asks you to pair colour with another clue, like shape or text.

A green dot for "online" and a red dot for "offline" look the same to many colour-blind users. Swap one for a different shape, or add a word. This is where icon styles help. A tick circle and a close circle differ in shape, not just colour.

The same goes for selected states. Switching a tab icon from linear to bold, as many apps do, gives a shape change that everyone can see.

Should icons have visible text labels?

Yes, most icons work better with a visible text label next to them. Only a handful of icons, like search, home and print, are understood without words.

Aurora Harley, writing for the Nielsen Norman Group, a respected UX research firm, explains that icons are often ambiguous and recommends a visible text label for nearly all of them. I see this all the time in user tests. People hover, guess, and hesitate.

A visible label also helps voice control users. They can say "click Settings" only if the word "Settings" is on screen.

How do you test whether your icons are accessible?

Test your icons with a screen reader, a keyboard and an automated checker. Together they catch most icon problems in about 15 minutes per page.

  1. Keyboard. Press Tab through the page. Every icon button should get a visible focus ring.
  2. Screen reader. Use VoiceOver on Mac and iPhone, or the free NVDA on Windows. Every button should say a clear name.
  3. Automated check. Run Lighthouse in Chrome DevTools or Deque's free axe DevTools extension. Both flag buttons without names and low contrast.
  4. Zoom. Zoom the browser to 200%. Icons should stay sharp, which SVG icons do. Our SVG vs PNG guide explains why.

What this means for your product

For most teams, five habits cover nearly every icon accessibility issue. Once you know them, you will never ship a nameless button again:

  1. Hide decorative icons with aria-hidden="true".
  2. Name icon-only buttons with aria-label.
  3. Keep icon contrast at 3:1 or higher.
  4. Make tap targets at least 24 px, ideally 44 px.
  5. Pair colour with shape or text.

fmicon handles the first habit for you. Its components are hidden from screen readers unless you give them a title, and every icon is drawn on a 24 px grid. You can browse the free icons or read the accessibility notes in the docs.

Small habits, a site everyone can use

Accessible icons come down to clear names, enough contrast, big enough targets and more than colour. None of it is hard, and each fix helps real people today. Start with your icon-only buttons, give each one a name, and you have already fixed the most common icon error on the web.

Frequently Asked Questions

Should icons have alt text?

Yes, icons that carry meaning should have alt text or an accessible name, and decorative icons should not. For an img tag, write a short alt such as "Search", or use an empty alt for decoration. For inline SVG, use aria-label on the button or a title inside the SVG.

What does aria-hidden do on an icon?

The aria-hidden="true" attribute hides an icon from screen readers while keeping it visible on screen. Use it on decorative icons that repeat nearby text, such as a trash icon beside the word "Delete". Never put aria-hidden on a button itself, or the whole button disappears for screen reader users.

Are icon fonts accessible?

Icon fonts are harder to make accessible than SVG icons. Screen readers may read the font's character as random text, and users who set their own fonts can see broken boxes instead of icons. GitHub moved its Octicons from a font to SVG in 2016, partly for accessibility.

What is the minimum size for an icon button?

The minimum size for an icon button is 24 by 24 CSS pixels under WCAG 2.2 success criterion 2.5.8. For touch screens, aim for 44 by 44 pixels, which matches Apple's guidance and the stricter WCAG criterion 2.5.5. The icon inside can stay 20 or 24 pixels.

Do decorative icons need a label?

No, decorative icons do not need a label, and adding one creates noise. A decorative icon repeats information that nearby text already gives. Hide it with aria-hidden="true" so screen readers skip it. Packages such as fmicon-react already hide icons by default unless you pass a title.

Keep Reading