Development & testing

Link without discernible text: fixing the “link-name” finding

What “Links must have discernible text” means, why icon and image links are affected and how to give links clear names, with HTML and WordPress examples.

6 min readUpdated: Accessonaut editorial team Published on

In short

The message “Links must have discernible text” (axe rule link-name) means that a link has no text that assistive technologies can use as its name. A screen reader then just says “link” or reads out the URL. This usually affects social media icons, linked images without alt text or empty anchors. Give every link a name that states its destination: as visible text, as the alt text of the linked image or as an aria-label.

What the rule checks

axe examines every link and computes its accessible name. The name can come from the link text, from the alt attribute of an image inside the link, from aria-label or from aria-labelledby. If the result is empty, the rule reports a failure of WCAG success criteria 2.4.4 “Link Purpose (In Context)” and 4.1.2 “Name, Role, Value”, both Level A.

Text hidden with display:none or aria-hidden="true" does not count. Nor does the rule check whether an existing name is understandable: a link with the text “here” passes the test. So always judge the wording yourself as well.

Typical causes

  • Icon links: Facebook, Instagram, phone or basket icons as an icon font or SVG without accompanying text.
  • Linked images: a logo or teaser image sits inside a link, but the image has alt="" or no alt attribute at all.
  • Empty anchors: an <a href="#"></a> used as a jump target or left over from a page builder module.
  • Card overlays: a whole teaser card is covered by an empty link so that it is clickable everywhere.
  • Hidden text: the link text was removed for design reasons with display:none or aria-hidden="true".

Who relies on named links

Many screen reader users move through a page via a list of links: the elements list in NVDA, the rotor in VoiceOver. A link without a name appears there as “link” or as an unreadable URL. People using voice control say, for example, “Click contact”; without a name, the link cannot be addressed that way.

People with cognitive impairments also benefit from clear link destinations, and for keyboard users visible text is more reliable than an icon whose meaning you have to know.

How to name the link correctly

Visible text is the most robust: <a href="/contact">Contact</a>. For icon links, add a name to the link and hide the graphic from assistive technologies, for example <a href="https://www.instagram.com/…" aria-label="Muster Bakery on Instagram"><svg aria-hidden="true" …></svg></a>. Alternatively, put text in a <span> with a CSS class such as visually-hidden that only hides text visually; display:none is not suitable for this.

For a linked image, the alt attribute names the destination: <a href="/"><img src="logo.svg" alt="Muster Bakery, home page"></a>. If the same link already contains visible text, the image gets alt="" so that the name is not announced twice. Replace empty jump anchors with an id on the target heading, such as <h2 id="directions">.

With aria-label, make sure the name contains the visible text. Success criterion 2.5.3 “Label in Name” requires this: anyone who says “Click Learn more” must reach the link with exactly those words. An aria-label completely replaces the link text.

Tips for WordPress and page builders

In the Image block, the alt text of a linked image describes the link destination. Menu items need text in the “Navigation Label” field; if only an icon should be visible, hide the text visually with CSS instead of leaving the field empty. Check your theme and page builder settings to see whether icon and social media elements offer a field for a label, screen reader text or an ARIA label.

If the empty links come from a plugin, such as a review or Instagram widget, report the finding with its selector and HTML snippet to the vendor. A reliable fix belongs in the source; rewriting links afterwards with JavaScript is error-prone.

Writing understandable link text

Once every link has a name, it is worth looking at the wording. Criterion 2.4.4 allows the purpose to be clear from the immediate context, such as the same sentence or list item. Ten identical “Read more” links are still hard to tell apart in a list of links. “More about our opening hours” or a linked title works better.

For downloads, state the format and, where helpful, the size, for example “Price list (PDF, 300 KB)”. If a link opens a new window, say so in the text so that nobody is surprised when the back button does not work.

Checking the fix

Run the website check again and see whether the finding has disappeared. In the developer tools, check the computed name of every corrected link under “Accessibility”. Then tab through the page, open your screen reader’s list of links and ask yourself for each entry: would I know where this link goes without looking at the page?

Sources & review status

Here you’ll find the original sources for this article. Last checked on .

Legal requirements depend on the country, the provider and the specific offer. This article explains the basics and practical steps. Test results apply to their documented scope and date.

More on Development & testing

Your next step

What does your website need?

Check a public page for automatically detectable barriers. The results show specific findings and help you prioritise.

Free website check

A sensible testing process

  • Find automatically detectable issues
  • Test the keyboard and real journeys manually
  • Fix, re-check and document
Guide to testing your website