How to fix link name on Adobe Commerce (Magento)

Add a descriptive, screen-reader-accessible text label to every link on your store so assistive technology can announce its purpose.

Steps for Adobe Commerce (Magento)

  1. Locate the relevant .phtml template file. Common problem areas: Magento_Theme/templates/html/header.phtml (search/cart icon links), Magento_Catalog/templates/product/list.phtml (product card links), Magento_Theme/templates/html/footer.phtml (social links).
  2. Always make changes inside a custom theme (app/design/frontend/[Vendor]/[theme]/) rather than editing core files — copy the template into your custom theme directory first.
  3. For icon-only links in the header, add aria-label: <a href='<?= $block->getUrl('checkout/cart') ?>' aria-label='<?= __('View shopping cart') ?>'>.
  4. For product image links in the product list, add aria-label='<?= $escaper->escapeHtmlAttr(__('View %1', $product->getName())) ?>' to the wrapping <a> tag.
  5. Run bin/magento cache:flush and bin/magento setup:static-content:deploy after saving template changes, then verify with axe DevTools.
Official Adobe Commerce (Magento) documentation ↗

What is link name?

Every clickable link on a webpage must have a meaningful text label that screen readers can announce to blind or low-vision users. A "link-name" failure means a link exists on your page but has no readable text — it might be an icon-only button (like a shopping cart or social media icon), an image link with no alt text, or an empty `<a>` tag. The WCAG 2.4.4 criterion ("Link Purpose") requires that the purpose of each link can be determined from the link text alone, or from its immediate surrounding context. Without a name, a screen reader will announce something useless like "link" or read out the raw URL instead of telling the user where the link goes or what it does.

Accessibility failures like this expose your store to legal risk under laws such as the ADA (US), AODA (Canada), EAA (EU), and Equality Act (UK) — lawsuits targeting e-commerce sites for WCAG non-compliance have increased sharply year over year. Beyond legal risk, approximately 7–8 million screen reader users in the US alone cannot navigate or purchase from a store with unnamed links, directly costing you sales. Google's crawlers also use link anchor text as a ranking signal, so unnamed links pass zero topical relevance to the pages they point to, weakening your internal linking SEO. Fixing this is typically a quick-win code change that immediately improves both accessibility compliance and search engine crawlability.

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 scan — we’ll find link name and every other issue across your whole site.

Scan my site free

Fix link name on another platform