Rule
Link names
Links must have an accessible name.
- Rule
link-name- WCAG 2.2
- 2.4.4 Link Purpose (In Context) (opens in a new tab) (Level A)
4.1.2 Name, Role, Value (opens in a new tab) (Level A) - Severity
- Serious
What it checks
Every element with the link role needs an accessible name: an <a> with an href, and anything with role="link". The name can come from the link's text, the alt of an image inside it, aria-label or aria-labelledby. A link with no name fails, because a screen reader has nothing to announce but its address.
A link whose role makes it a button or a tab is left to the rules for those controls. An <a> without href is not a link and is not checked.
Example
Fails
<a href="/basket/">
<svg width="24" height="24" aria-hidden="true"><path d="M3 5h18l-2 9H6z"/></svg>
</a>
Passes
<a href="/basket/" aria-label="Basket">
<svg width="24" height="24" aria-hidden="true"><path d="M3 5h18l-2 9H6z"/></svg>
</a>
The engine is tested against both examples.
How to fix it
Give the link text, or an alt on the image inside it. For a link that is only an icon, add an aria-label that names the destination.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.