Website Spec
← Accessibility
Avoid

Empty links and buttons

A link or button with no accessible name is invisible to screen readers and unreachable for voice control. Icon-only controls without a label are the usual culprit.

What it is

An empty link or button is one where the accessibility tree records no name. Visually it might be a clear icon — a magnifying glass, a hamburger, an X — but the screen reader announces "link" or "button" with no further information. The user has no idea what it does.

This fails WCAG 2.4.4 (Level A, link purpose) and 4.1.2 (Level A, name role value) at the same time.

Why it matters

Empty controls are at the top of every accessibility scanner's findings because they are easy to detect and ship in huge numbers. Icon-only buttons and image-only links are the usual sources: a designer placed an SVG inside a <button>, nobody added a label, and the control becomes a guessing game.

Voice-control users are hit hardest. Their software lets them say "click search" — but if the search button has no name, there is nothing to say.

How to implement

Give every link and button an accessible name. Pick whichever fits the design:

Icon plus visible text (the easiest case):

<button type="button">
  <svg aria-hidden="true" focusable="false">…</svg>
  Search
</button>

Icon only — use aria-label:

<button type="button" aria-label="Close dialog">
  <svg aria-hidden="true" focusable="false">…</svg>
</button>

Image link — give the <img> a useful alt:

<a href="/"><img src="logo.svg" alt="Acme home"></a>

Tooltip-only labelling is not enough. A title attribute does not produce a reliable accessible name in every browser and assistive tech combination. Use aria-label or visible text instead.

Rules of thumb:

Common mistakes

Verification

Sources