Names and roles
Links need a name
- Rule:
link-name - Severity: Serious
- WCAG level A
Why it matters
Screen reader users navigate by pulling up a list of links. An unnamed link appears there as its URL, and a list of "Read more" links is no better.
How to fix it
- Make the link text describe the destination on its own.
- For icon-only links, add aria-label ("Basket, 3 items").
- Where "Read more" must stay visible, extend the name with aria-label that includes it.
In markup
<a href="/cart"><svg aria-hidden="true">...</svg></a><a href="/cart" aria-label="Basket, 3 items">
<svg aria-hidden="true">...</svg>
</a>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 2.4.4 Link Purpose (In Context) (opens in new tab) — WCAG level A
- 4.1.2 Name, Role, Value (opens in new tab) — WCAG level A
Further reading
Deque University on link-name (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.