Screen reader users navigate sites by tabbing through links and hearing them announced. A link without a name is announced simply as "link," forcing users to guess its destination.
Lighthouse flags anchor elements (<a>) that have no accessible name. This happens when links contain only images without alt text, use CSS background images, or have empty content. The audit checks for text content, aria-label, aria-labelledby, or alt text on child images. Without any of these, the link becomes a mystery to assistive technology users.
aria-label, or images with alt textThe clearest solution is descriptive text content inside the link.
<!-- Before: empty link -->
<a href="/pricing"></a>
<!-- After: visible text -->
<a href="/pricing">View pricing plans</a>
<!-- Before: generic text -->
<a href="/report.pdf">Click here</a>
<!-- After: descriptive text -->
<a href="/report.pdf">Download annual report (PDF)</a>
When visual design requires icon-only links, use aria-label.
<!-- Before: icon link with no name -->
<a href="https://twitter.com/mycompany">
<svg class="icon-twitter">...</svg>
</a>
<!-- After: aria-label provides the name -->
<a href="https://twitter.com/mycompany" aria-label="Follow us on Twitter">
<svg class="icon-twitter" aria-hidden="true">...</svg>
</a>
When a link wraps an image, the image's alt text becomes the link name.
<!-- Before: image link without alt -->
<a href="/">
<img src="/logo.svg">
</a>
<!-- After: alt text names the link -->
<a href="/">
<img src="/logo.svg" alt="Acme Corp homepage">
</a>
When you need visible icons but want full text for screen readers.
<a href="/cart">
<svg aria-hidden="true">...</svg>
<span class="sr-only">Shopping cart (3 items)</span>
</a>
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
UButton component with to prop automatically handles accessibility when you provide a label. For icon-only buttons that act as links:<UButton
to="/settings"
icon="i-heroicons-cog-6-tooth"
aria-label="Settings"
variant="ghost"
/>
aria-label.display: none — This removes content from the accessibility tree; use the .sr-only pattern insteadLink name issues often appear alongside:
Anonymous icon links frequently appear in headers, footers, and social media sections across many pages. Unlighthouse audits every page of your site in one scan, identifying all links lacking discernible names so you can fix them systematically rather than hunting through templates manually.