Fix guides · Accessibility

How to fix “Links do not have a discernible name” (icon links)

Icon-only links (social icons, a cart, a logo image) are announced as just "link" to screen reader users. How to give them a name on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.

Time to fix
10–20 minutes
Skill needed
No code
Who notices
Screen reader and voice-control users

Why it matters

A link that contains only an icon, or an image with no alt text, has no words for assistive technology to read. Screen readers announce it as "link" or read out the web address, so visitors can't tell your Instagram link from your cart.

People who control their computer by voice say a link's name to click it. A link with no name can't be clicked that way at all.

“Link text and alternate text for images, when used as links, must be discernible by a screen reader, and must be focusable.”

Deque axe rule: link-name (used by Lighthouse)

Before you start

  • Your report shows each link that failed. They're usually social icons, a logo that links home, a cart or search icon, or an image used as a link.
  • If the link is an image, giving the image alt text names the link. Describe the destination: "StudioLNC home", not "logo".
  • For icons, the name should say where the link goes: "Instagram", "Cart", "Search".

Fix it on your platform

Shopify

  1. Image links (banners, a logo image): add alt text to the image. Product images are covered in our alt text guide; section images are set in the theme editor where your theme allows it.
  2. Many themes already label their social and cart icons with hidden text. If yours doesn't, the fix is in the theme code (Online Store → Themes → ⋯ → Edit code): add a visually hidden label or an aria-label to the icon link, or ask your theme developer.
Theme code (example)
<a href="{{ routes.cart_url }}" aria-label="Cart">
  {% render 'icon-cart' %}
</a>

WordPress

  1. Social Icons block: select an individual icon and fill in its Text setting in the sidebar with the network's name.
  2. Image links: select the image and add Alternative text that describes the destination.
  3. Icons added by your theme or a plugin (cart, search, menu) are fixed in that theme's or plugin's settings, or by its developer.

Webflow

  1. Image links: select the image and set its alt text in Image settings, describing where the link goes.
  2. Icon links: select the link, open Element settings → Custom attributes, click + and add aria-label with a short name (for example "Instagram").

Wix

  1. Image links: select the image, click the Settings icon and describe the destination under "What's in the image?".
  2. Wix sets accessible names on most of its own elements. For icon buttons you've added, check the element's accessibility settings for a label; adding custom ARIA attributes may require developer mode (Velo). Wix's help center describes both routes.

Squarespace

  1. Image links: open the image block editor, go to the Content tab and fill in the Image alt text field with the destination.
  2. Squarespace generates the code for its social and header icons. If those are flagged and you can't find a label setting for them, contact Squarespace support.

Next.js

  1. Give icon links an aria-label, or include visually hidden text next to the icon. Mark the icon itself as decorative.
  2. For image links, use a meaningful alt on next/image.
Icon link
<a href="https://instagram.com/studiolnc">
  <InstagramIcon aria-hidden="true" />
  <span className="sr-only">Instagram</span>
</a>

Any other site

  1. Add text inside the link (visually hidden if needed) or an aria-label, and hide the icon from screen readers.
HTML
<a href="/cart" aria-label="Cart">
  <svg aria-hidden="true" focusable="false">…</svg>
</a>

<a href="/"><img src="logo.svg" alt="StudioLNC home"></a>

Check that it's fixed

  • Re-run your StudioLNC audit: the issue should be gone, or list fewer links.

Find every issue like this on your site

Free audit of performance, accessibility, SEO and security, with fixes for your platform.