How to fix link name on Adobe Commerce (Magento)

Add a descriptive, screen-reader-accessible label to every link on your store so assistive technologies can announce where each link leads.

Steps for Adobe Commerce (Magento)

  1. SSH into your server (or use your IDE) and locate the PHTML or HTML template file responsible for the problematic link — common paths: app/design/frontend/<Vendor>/<theme>/Magento_Theme/templates/html/header.phtml (for header icons), Magento_Catalog/templates/product/list.phtml (for product card links), Magento_Theme/templates/html/footer.phtml (for footer/social links).
  2. Add aria-label='<descriptive text>' to the <a> tag, or for linked images ensure the <img> tag has a non-empty alt attribute.
  3. If using a third-party theme, create a template override in your custom theme directory rather than editing vendor files directly.
  4. Run bin/magento cache:clean && bin/magento cache:flush after saving.
  5. Re-test with the axe DevTools browser extension on the front end.
Official Adobe Commerce (Magento) documentation ↗
<a href="/collections/shoes" aria-label="Shop Women's Running Shoes">
  <!-- icon or image with no visible text -->
  <img src="shoes-banner.jpg" alt="">
</a>

<!-- OR: visually-hidden text technique -->
<a href="/pages/returns">
  <svg aria-hidden="true" focusable="false">…</svg>
  <span class="visually-hidden">View our return policy</span>
</a>

/* Visually-hidden utility class */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

What is link name?

Every hyperlink on a webpage must have a meaningful text label that screen readers can announce to blind or low-vision users. A link's accessible name can come from the visible text inside it, an image's alt text, an `aria-label` attribute, or an `aria-labelledby` reference. When a link contains only an icon, an image with no alt text, or an empty `<a>` tag, screen readers have nothing meaningful to say — they may just announce "link" or skip it entirely. WCAG Success Criterion 2.4.4 ("Link Purpose – In Context") requires that every link's purpose can be determined from its label alone or from its surrounding context.

Links without accessible names fail WCAG 2.4.4 (Level AA), which is the legal accessibility standard referenced in the ADA, Section 508 (US), EN 301 549 (EU), and similar laws worldwide — exposing your store to demand letters, complaints, and lawsuits that are increasingly common in ecommerce. Beyond legal risk, screen-reader users (estimated at 7–8 million in the US alone) simply cannot navigate your store's menus, product cards, or checkout links, costing you real customers and revenue. Search engines also use link anchor text as a ranking signal; unnamed links are dead weight that dilutes your internal linking strategy and can suppress category and product page rankings. Fixing this issue improves accessibility, SEO, and conversion simultaneously.

See the complete Link name guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ audit — we’ll find link name and every other issue across your whole site.

Scan my site free

Fix link name on another platform