link.text.exists
- Default
- error
- Plugin
link
A link has text, an aria-label, or an image with alt text.
Why: Search engines use link text to learn what the target page is about, and screen readers read it aloud. A link without text says nothing.
When off: links without text pass.
<!-- ✗ Fails -->
<a href="/menu/"><img src="/menu.svg" alt="" /></a>
<!-- ✓ Passes -->
<a href="/menu/">Menu</a>
<a href="/menu/" aria-label="Menu"><img src="/menu.svg" alt="" /></a>
References
- Google: Link best practices: Google uses link text, and the
altof an image link, to understand the target. - WCAG 2.2: Understanding Link Purpose (In Context): A link needs text that says where it goes (Level A).
- axe: link-name: The same check in axe-core.