How do you make an icon-only button understandable without a visible label?

On this page

An icon-only button becomes understandable when its meaning travels through several channels at once: a conventional, recognizable glyph for people who scan visually, an accessible name that assistive technology can announce, and a label or tooltip available on demand for anyone who hovers or focuses. A clean magnifying glass or trash can is not enough on its own, because no icon is universally legible and none of them say anything to a screen reader. The work is to make the button announce itself even when no text is visible, so that meaning is never trapped inside the picture.

The mechanism that fails silently is the accessible name. A <button> with only an <svg> or icon font inside has, as far as the accessibility tree is concerned, no name at all, so a screen reader announces something like “button” with nothing more, and the user is left guessing. You give it a name by adding an aria-label to the button, or by including visually hidden text inside it, or by pointing aria-labelledby at an element that holds the words. Decorative icons inside should be hidden from the tree with aria-hidden="true" or an empty alt so the glyph does not compete with or muddy the name you supplied.

Consider a toolbar of square icon buttons across the top of an editor: bold, italic, link, image, and a trash can. Visually it reads fine to a designer who lives in that toolbar all day. To a screen reader user who lands on the fourth button, the audio is “button, button, button, button” with no distinction, and the trash can is indistinguishable from the link control until something is accidentally deleted. Giving each one an aria-label (“Bold,” “Insert link,” “Delete”) turns that wall of identical announcements into a usable, nameable set of controls.

The sighted-but-uncertain user needs a third channel, and this is where the boundary sits. A native title attribute does produce a small tooltip on mouse hover, but it is unreliable: it does not appear on keyboard focus, it does not work on touch, and screen readers treat it inconsistently. So title is a weak supplement, not a substitute for the accessible name. A purpose-built tooltip that appears on both hover and focus, wired to the button with aria-describedby, gives sighted users the on-demand label without breaking the name that assistive tech already reads. The accessible name carries the core meaning; the tooltip enriches it.

One real boundary to respect: the visible text of a tooltip and the accessible name should agree, and if any visible text accompanies the icon, the accessible name must contain that visible text so that voice-control users who say “click Delete” actually hit the button. Mismatched names (“aria-label says Remove, tooltip says Delete”) create exactly the confusion you set out to prevent. Keep the wording consistent across every channel.

When you build an icon-only button, pick a conventional glyph, give the button an accessible name through aria-label or hidden text, hide the decorative icon from the accessibility tree, and add a tooltip that surfaces on both hover and focus for sighted users. Then test it once with a screen reader and once by keyboard alone: if either path leaves you unable to tell what the button does, the meaning is still trapped in the picture and the work is not finished.

Leave a comment

Your email address will not be published. Required fields are marked *