Black Friday: is your store ready?Free check + 7 days of Pro free →

Empty links: fix cart, search and social icons

Last updated:

An empty link is a link with nothing for a screen reader to announce: typically a cart, search, account or social icon with no text behind it. The shopper hears "link" and has to guess. On an online store, these icons are the way to the cart and the account, so the fix is worth ten minutes: give every icon link an accessible name.

How common it is

WebAIM's 2026 analysis of the top one million home pages found empty links on 46.3% of them, the fourth most common detectable error, and at least one detectable WCAG failure on 95.9% of pages. Shopping sites did worse than average: the report counts about 71 errors per home page in its shopping category, against 56 overall. The header of a typical store explains a lot of it: logo, search, account, wishlist and cart are often five icon links in a row.

What an empty link looks like

<!-- Empty: nothing to announce -->
<a href="/cart"><svg class="icon-cart">…</svg></a>

<!-- Empty: the image has no alt text -->
<a href="https://instagram.com/yourstore"><img src="/img/instagram.svg"></a>

Sighted shoppers recognise the icon. A screen reader user gets "link" five times in a row, or a long URL read aloud.

Three ways to fix it

1. An aria-label on the link, the simplest for icon links:

<a href="/cart" aria-label="View your cart">
  <svg class="icon-cart" aria-hidden="true">…</svg>
</a>

2. Visually hidden text, which also gets translated by browser translation tools:

<a href="/account">
  <svg aria-hidden="true">…</svg>
  <span class="visually-hidden">Your account</span>
</a>

3. Alt text on an image link: <img src="/img/instagram.svg" alt="Our Instagram page">.

Name the destination or action, not the icon: "View your cart", not "Cart icon". If the cart shows a count, include it: aria-label="Cart, 2 items".

Where to look in a store

  • Header: logo link, search, account, wishlist, cart, mobile menu.
  • Product cards: an image link next to a title link to the same product. Either wrap both in one link, or give the image link an empty alt="" and tabindex="-1" so it isn't announced twice as nothing.
  • Footer: social icons and payment logos that are links.
  • Sliders and galleries: previous and next arrows, thumbnails.
  • Apps and widgets: chat bubbles, review stars and "quick view" buttons added by third-party scripts.

Icon buttons have the same problem and the same fix: a <button> with only an icon needs an aria-label too.

Check it yourself

In the browser console, this lists links with no accessible text:

[...document.querySelectorAll('a[href]')].filter(a =>
  !a.textContent.trim() && !a.getAttribute('aria-label') &&
  !a.getAttribute('aria-labelledby') && !a.querySelector('img[alt]:not([alt=""])'))

Then tab through your header with the keyboard: every stop should make sense when read out of context.

Once links have names, make sure the names are useful: ten "Read more" links are not empty, but they are no clearer. See accessibility basics for online stores for the other quick fixes, and the European Accessibility Act guide for the legal context.

How Averifly helps

Averifly's accessibility rules flag links with no accessible text and links with ambiguous text, along with images without alt text and form fields without labels, and list the pages where they occur. Run a free scan, and see our rules for the full list of checks.

Frequently asked questions

What is an empty link?

A link with no text that assistive technology can read: usually an icon or image inside an <a> tag, with no visible text, no aria-label and no alt text. A screen reader announces it as just "link", or reads out the URL.

How do I fix an icon-only link?

Give it an accessible name. Add an aria-label to the link (aria-label="View your cart"), or put visually hidden text inside it, or, for an image link, a descriptive alt attribute. Mark a purely decorative SVG icon with aria-hidden="true".

Should I use the title attribute instead?

Not on its own. The title attribute is not reliably announced by screen readers and does not show on touch screens. Use aria-label or real text, and keep title only as an optional tooltip.

More Accessibility guides