Links must have discernible text
How to fix the link-name accessibility rule. Names of links, buttons and controls.
What this rule checks
Ensure links have discernible text
Who is affected
Screen readers announce this link as just "link", so users can't tell where it goes. This usually happens with icon-only links.
How to fix it
Give the link visible text, or an aria-label if it's an icon. If it wraps an image, give the image alt text.
Example
Before
<a href="/cart"><svg>…</svg></a>After
<a href="/cart" aria-label="Shopping cart"><svg aria-hidden="true">…</svg></a>WCAG success criteria
When this rule fails, the page fails:
- 2.4.4 Link Purpose (In Context) (Level A, WCAG 2.0, 2.1, 2.2)
- 4.1.2 Name, Role, Value (Level A, WCAG 2.0, 2.1, 2.2)
Find it on your own page
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.
More detail
- Deque University’s reference for link-name (the makers of axe-core, the engine our scanner uses)
- All fix guides