Fix link-name in Shopify Liquid
Shopify themes commonly trigger serious link-name violations in snippets/social-icons.liquid, header cart anchors (<a href='{{ routes.cart_url }}'>), and stretched-link overlays inside snippets/card-product.liquid that leave an empty <a href='{{ product.url }}'></a>. Adding localized .visually-hidden text or aria-label resolves every page across the storefront.
Before and after
{%- comment -%} snippets/social-icons.liquid (Broken: empty icon anchor) {%- endcomment -%}
{%- if settings.social_instagram_link != blank -%}
<li class="list-social__item">
<a href="{{ settings.social_instagram_link }}" class="list-social__link">
{%- render 'icon-instagram' -%}
</a>
</li>
{%- endif -%}{%- comment -%} snippets/social-icons.liquid (Fixed: visually-hidden destination + aria-hidden SVG) {%- endcomment -%}
{%- if settings.social_instagram_link != blank -%}
<li class="list-social__item">
<a
href="{{ settings.social_instagram_link }}"
class="list-social__link"
rel="noopener noreferrer"
>
<span aria-hidden="true">{%- render 'icon-instagram' -%}</span>
<span class="visually-hidden">
{{ shop.name | escape }} on {{ 'general.social.links.instagram' | t | default: 'Instagram' }}
</span>
</a>
</li>
{%- endif -%}Fixed vs. broken example
Open the VoiceOver Web Rotor (Control+Option+U) or NVDA Elements List (NVDA+F7) to confirm every icon anchor shows a clear destination label.
Playwright + axe-core check
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
test("Shopify header cart, logo, and footer social links pass link-name", async ({ page }) => {
await page.goto("/");
const results = await new AxeBuilder({ page })
.withRules(["link-name"])
.analyze();
expect(results.violations).toEqual([]);
});Template deduplication tip
Unlabeled Instagram/TikTok icons in snippets/social-icons.liquid or the cart link in sections/header.liquid fire on every single storefront URL. A11yDrift collapses hundreds of raw link-name failures into one global header/footer cluster.
What NVDA and VoiceOver announce
Screen-reader users routinely pull up a rotor or links list to jump straight to destinations. Bare icon anchors, empty product-image wrappers, or unlabeled social links appear as meaningless raw URLs or blank entries.
NVDA (Windows)
"link, #social-demo" (raw href fragment read verbatim)
"View A11yDrift on GitHub, link"
VoiceOver (macOS / iOS)
"link" (or raw URL path)
"View A11yDrift on GitHub, link"
Common questions
Why do Shopify full-card stretched links fail axe-core link-name?
What accessible name should a Shopify header logo link use?
Should external Shopify social links open in a new tab?
Test a URL for link-name
Enter any public URL for a free WCAG 2.2 AA check—no account or credit card required.
Managing Shopify Liquid client sites? Monitor 15 sites on one flat plan with white-label portals and branded executive PDFs—$1,140/yr ($95/mo billed annually, 24-month rate lock + onboarding) for Founding 10 agencies.