How to Fix Links Without Discernible Text on Your Site

A link without discernible text is an <a href> element that assistive technology cannot name. It usually happens with icon-only social links, logo images with empty alt text, or empty anchors used as JavaScript triggers. By the end of this guide, every link on your page will expose a clear accessible name that describes where it goes, and the audit will pass.

By Updated ⏱ 20 minutes🎯 Beginner● Medium impactAccessibility
Illustration: Links have discernible text fix guide
ACCESSIBILITY · FIX GUIDE Links have discernible text IMPACTEFFORT TIME20 minutes LEVELBeginner

Why it matters

Screen readers announce a nameless link as "link" or read out the raw URL, such as "link, https colon slash slash example dot com slash p slash 4821". That leaves blind and low-vision visitors guessing about your navigation, cart, and social links. 2 (Name, Role, Value), which matters for ADA and European Accessibility Act exposure.

Search engines and AI crawlers also use anchor text and image alt text to understand what a linked page is about, so empty links waste internal-linking signals.

✕Before<ahref="https://www.instagram.com/exampleco"><svgclass="icon-instagram">…</svg></a> is✓After<ahref="https://www.instagram.com/exampleco"aria-label="Example Co on

What you need

Access to edit your theme, templates or page builder
Chrome or Edge with the free axe DevTools extension, or Lighthouse in DevTools
A list of failing link selectors from your audit report

Step-by-step fix

1

Locate every link that has no accessible name

Open the page in Chrome, press F12, and run Lighthouse > Accessibility. Look for "Links do not have a discernible name". Alternatively, open the axe DevTools tab and click Scan ALL of my page, then filter by the "Links must have discernible text" issue.

Each result shows a CSS selector and the HTML snippet. Copy them into a list. The usual offenders are:

  • social icons in the header or footer
  • logo links
  • cart and search icons
  • carousel dots
  • "card" overlay links
Pro tip: Check templates, not just single pages. One footer fix usually clears the error across the whole site.
2

Give icon-only links a text label

A link whose only content is an SVG or icon font has no text to read. Add either visually hidden text inside the link or an aria-label on the <a>. Then hide the decorative icon with aria-hidden="true".

Describe the destination, not the icon: write "Example Co on LinkedIn" or "View cart", not "LinkedIn icon".

html
<!-- Option A: aria-label -->
<a href="/cart" aria-label="View cart (2 items)">
  <svg aria-hidden="true" focusable="false"><use href="#icon-cart"></use></svg>
</a>

<!-- Option B: visually hidden text (also translatable by browser tools) -->
<a href="https://www.linkedin.com/company/exampleco">
  <svg aria-hidden="true" focusable="false"><use href="#icon-linkedin"></use></svg>
  <span class="visually-hidden">Example Co on LinkedIn</span>
</a>

<style>
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
</style>
Pro tip: Don't hide the label text with display:none or visibility:hidden. Text hidden that way is removed from the accessibility tree and the link still fails.
3

Add alt text to images that are the only link content

When an <img> is the only thing inside a link, its alt attribute becomes the link's name. An empty alt="" or a missing alt leaves the link nameless. Write the alt text as the link's purpose: for a header logo that links home, use "Example Co home", not "logo.png".

html
<a href="/">
  <img src="/img/example-co-logo.svg" alt="Example Co home" width="160" height="40">
</a>
Pro tip: If the link also contains visible text, keep alt="" on the image so the name isn't read twice.
4

Replace empty placeholder anchors

Links like <a href="#" class="slider-dot"></a> or <a href="javascript:void(0)" onclick="openMenu()"></a> are flagged because they contain nothing. Handle them like this:

  • If the element performs an action (opens a menu, changes a slide), make it a <button type="button"> with a label.
  • If it really navigates, give it text.
  • If two adjacent links point to the same URL (an image link plus a title link on a product card), merge them into one <a>.
html
<!-- Before -->
<a href="#" class="slider-dot" data-slide="2"></a>

<!-- After -->
<button type="button" class="slider-dot" data-slide="2" aria-label="Show slide 2 of 5"></button>
5

Check aria-labelledby, title and aria-hidden usage

A link also fails when its name points to nothing or when its content is hidden. Look for these patterns:

  • aria-labelledby must reference an existing id on the page. A typo or a removed element leaves the name empty.
  • aria-hidden="true" on the only child (for example, the text span) removes the name entirely.
  • role="presentation" or role="none" on a focusable link conflicts and is flagged.

A title attribute alone technically passes, but many screen-reader and touch users never hear or see it. Prefer real text or aria-label.

html
<h3 id="post-42-title">Spring pricing update</h3>
<a href="/blog/spring-pricing" aria-labelledby="post-42-title">
  <img src="/img/spring.jpg" alt="">
</a>
Pro tip: If a visible label exists, make sure your aria-label starts with the same words. That keeps voice-control users ("click Contact") working, per WCAG 2.5.3.
6

Deploy, clear caches and re-test

Publish the changes and purge any page cache or CDN cache so the new HTML is served. Re-run Lighthouse or the axe DevTools scan on each template you changed: home, product or post, category, and cart. Then re-run the site audit.

The "Links have discernible text" check should pass with zero failing elements.

Pro tip: Add axe to your CI (for example, @axe-core/playwright) so new icon links can't ship without a name.

Platform-specific notes

WordPress

In the block editor, the **Social Icons** block has a **Label** field for each icon. Fill it in, or enable **Show labels** in the block sidebar. For image links, select the Image block and set **Alternative text** in the block settings sidebar. Classic theme icon menus are usually in header.php or footer.php. In block themes, edit **Appearance > Editor > Patterns > Header/Footer**.

Shopify

Dawn-based themes print visually hidden text for social links from **Online Store > Themes > Customize > Theme settings > Social media**. Custom themes often lack it, so edit snippets/social-icons.liquid or sections/header.liquid via **Edit code** and add a span using the theme's `visually-hidden` class. Set logo alt text under **Content > Files**, or on the image in **Theme settings > Logo**.

Wix

For social bar and image links, select the element and open **Settings**. Fill in **What's in the image?** (alt text) for each icon. For icon buttons, use the element's **Accessibility** panel to add an ARIA label. Then run the built-in **Accessibility Wizard** (Settings > Accessibility) to catch remaining unnamed links.

Webflow

For an image inside a Link Block, set **Alt text** in the image's Settings panel (D). For SVG or icon Link Blocks, open the link's **Element settings > Custom attributes** and add `aria-label` with a descriptive value. Use the Audit panel in the Designer to flag remaining issues before publishing.

Next.js / React

`<Link>` renders a plain `<a>`, so its children must provide the name. Icon components from libraries like lucide-react or Heroicons render bare SVGs. Pass `aria-hidden` to the icon and put `aria-label` on the `<Link>` itself. With `next/image` inside a link, the `alt` prop is the link name, so don't leave it empty when the image is the only content.

Check that it worked

✅ How to verify

  • Run Lighthouse > Accessibility in Chrome DevTools and confirm "Links do not have a discernible name" no longer appears.
  • Scan with axe DevTools and confirm zero results for the link-name rule ("Links must have discernible text").
  • In DevTools, select a fixed link and open the Accessibility pane. Under Computed Properties, the Name should show your descriptive text.
  • Open the links list in a screen reader (NVDA: Insert+F7; VoiceOver: VO+U, then Links) and check that every entry is meaningful.

⚠️ Common mistakes

  • Labeling the icon instead of the destination, such as aria-label="icon" or alt="facebook-logo.png" instead of "Example Co on Facebook".
  • Hiding the label with display:none or putting aria-hidden="true" on the text span, which removes the accessible name entirely.
  • Adding aria-label to the SVG while leaving the <a> unlabeled and the SVG without role="img", so the name never reaches the link.
  • Fixing one page in the editor while the failing link lives in a shared header or footer template used site-wide.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

What does "links must have discernible text" mean?

It means at least one link has no accessible name: no inner text, no image alt text, no aria-label and no valid aria-labelledby. Assistive technology therefore can't tell users where the link goes.

Is aria-label or visually hidden text better for icon links?

Both pass and both work in current screen readers. Visually hidden text gets translated by browser translation tools and is easier for content editors to manage. aria-label is quicker to add in page builders. Either way, also set aria-hidden="true" on the decorative icon.

Does "Read more" count as discernible text?

Yes, it passes this check because the link has a name. It is still weak for WCAG 2.4.4 when several identical "Read more" links point to different pages. Append hidden context, such as "Read more about spring pricing", or link the article title instead.

Does fixing empty links help SEO?

Indirectly, yes. Google uses anchor text and the alt text of linked images to understand the target page. Empty links pass no descriptive signal, so naming them improves internal-link context as well as accessibility.