Skip to content

Making icons accessible: labels, contrast and touch targets

5 December 2026 ยท 3 min read

Icons save space, and people spot them fast. But that only helps people who can see them and know what they mean. A few small habits make icons work for everyone. That includes people who use a screen reader, people with low vision and people on touch screens.

Is the icon for show, or does it mean something?

Ask this first for every icon.

  • For show: the icon sits next to text that says the same thing. A bin icon beside the word "Delete" is one. A screen reader should skip it.
  • It means something: the icon is the only thing that tells people what to do. A button with just a magnifying glass is one.

Icons for show: hide them

For an image:

<img src="trash.svg" alt="" width="24" height="24"> Delete

The empty alt tells screen readers to skip the image. Do not leave alt out. If you do, the screen reader may read the file name out loud.

For SVG code in the page:

<svg aria-hidden="true" viewBox="0 0 24 24">...</svg> Delete

Icons that mean something: give them a name

For an image, say what it does, not what it shows:

<img src="search.svg" alt="Search" width="24" height="24">

For a button with only an icon, label the button:

<button type="button" aria-label="Search">
  <svg aria-hidden="true" viewBox="0 0 24 24">...</svg>
</button>

Write the label for the action. Use "Search", not "Magnifying glass".

Show a label when you can

Very few icons are clear to everyone. Home, search, print and close are fairly safe. Most others are a guess. A short label that people can see takes away the guess. It helps all users, not just people with a screen reader. If space is tight, a tooltip is better than nothing. But it does not help on touch screens.

Contrast

An icon that means something must stand out from what is behind it. The contrast should be at least 3:1. This is the same rule as for buttons and form fields.

  • Thin line icons in light grey often fail. Make the colour darker or use a heavier style.
  • Do not use colour alone to show a state. A red dot and a green dot look the same to many people. Add a shape, such as a tick and a cross.
  • Check the hover and switched-off states, not just the normal one.

Size and touch targets

An icon can be 24 pixels. But the area you can tap should be bigger. Aim for at least 44 by 44 CSS pixels. Never go below 24 by 24. Add padding to the button, not to the image.

.icon-button { padding: 10px; }       /* 24px icon + 20px = 44px target */
.icon-button svg { width: 24px; height: 24px; display: block; }

Motion

Some people turn off motion on their device. If your icon moves, respect that setting:

@media (prefers-reduced-motion: reduce) {
  .icon { animation: none; }
}

A short checklist

  • Is each icon hidden, or does it have a name?
  • Does each button with only an icon have a label?
  • Does the icon reach 3:1 contrast?
  • Is the touch target at least 44 pixels?
  • Would a label people can see make it clearer?

Good icons help with the first step. Clear shapes with the same line weight are easy to spot. Browse the Smash Icons categories to find a set. Then use the checklist above.

More from the blog