Barrierepruefung.de Web Accessibility Checker

Link without a discernible name

The finding means a link has no name that a screen reader can announce. Usually it contains only an icon, an image without alternative text, or text that is hidden. Give it a name that states the destination: as text inside the link, as the image's alt, or as an aria-label.

Last reviewed: Sources

The message

Identifier
link-name
Type of check
automatic
Severity
serious
Meaning
The link has no accessible name.
Impact
The link target is not identifiable without visual context.
Fix
Give the link meaningful text or an aria-label.

How does your website stand?

The free check shows what can be measured automatically, with the location. No account.

Check website for free

What the rule checks

axe looks at every <a> with an href and asks whether it has an accessible name. The name can come from the link's content, meaning text or the alternative text of an image inside it, or from aria-label, aria-labelledby or a non-empty title. If none of these is present, the rule reports the link.

It does not check whether the name fits the destination. A link named "image" passes this rule and still tells nobody anything.

Common causes

  • Only an icon. Social media links, shopping basket, search: the link holds an <svg> without a title, or a glyph from an icon font such as <i class="icon-facebook"></i>.
  • Image without alternative text. The logo links to the home page, but the image has alt="" or no alt at all. The W3C lists this as a failure (F89).
  • Hidden text. The link text sits in an element with display: none or aria-hidden="true", for instance because it is meant to appear on narrow screens only.
  • Background image instead of content. The icon is added in CSS as a background-image, and the link itself is empty.
  • Reference to nothing. aria-labelledby points to an id that does not exist on the page.

How to fix it

For an icon link, the link gets the name and the icon is hidden from screen readers. Text that is only visually hidden is the most robust option:

<a href="https://www.instagram.com/example-club/">
  <svg aria-hidden="true" focusable="false" width="24" height="24">…</svg>
  <span class="visually-hidden">The club on Instagram</span>
</a>
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

aria-label on the link is shorter (ARIA8):

<a href="/basket" aria-label="Shopping basket">
  <svg aria-hidden="true" focusable="false">…</svg>
</a>

If an image is the only content, its alternative text describes the destination, not the picture (H30):

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

If visible text sits next to the icon, that text is the name, and an extra aria-label is unnecessary. If you add one anyway, it must contain the visible text, or the link fails 2.5.3 Label in Name (Level A).

When link text describes the purpose well enough is explained on the page about WCAG 2.4.4.