Fix select-name in Shopify Liquid
Shopify collection sort dropdowns (snippets/facets.liquid), country/currency selectors (sections/footer.liquid), and product option <select> pickers (snippets/product-variant-picker.liquid) routinely omit a <label for> binding—causing screen readers to announce only 'Featured, combo box'. Pairing each <select> with a unique section.id-scoped <label for> resolves the critical error across every collection and product page.
Before and after
{%- comment -%} snippets/facets.liquid (Broken: sort <select> has no label or aria-label) {%- endcomment -%}
<select name="sort_by" class="facet-filters__sort">
{%- for option in collection.sort_options -%}
<option value="{{ option.value | escape }}"{% if option.value == sort_by %} selected{% endif %}>
{{ option.name | escape }}
</option>
{%- endfor -%}
</select>{%- comment -%} snippets/facets.liquid (Fixed: explicit <label for> bound with section.id) {%- endcomment -%}
<div class="facet-filters__field">
<label class="facet-filters__label" for="SortBy-{{ section.id }}">
{{ 'products.facets.sort_by_label' | t | default: 'Sort by' }}
</label>
<select
id="SortBy-{{ section.id }}"
name="sort_by"
class="facet-filters__sort"
aria-describedby="a11y-refresh-page-message"
>
{%- for option in collection.sort_options -%}
<option value="{{ option.value | escape }}"{% if option.value == sort_by %} selected{% endif %}>
{{ option.name | escape }}
</option>
{%- endfor -%}
</select>
</div>Fixed vs. broken example
Avoid relying on a dummy first <option> like "Sort by..." as the sole label; once a user picks an option, the purpose disappears for everyone.
Playwright + axe-core check
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
test("Shopify collection sort & product variant selects pass select-name", async ({ page }) => {
await page.goto("/collections/all");
await expect(page.getByRole("combobox", { name: /sort by/i })).toBeVisible();
const results = await new AxeBuilder({ page })
.withRules(["select-name"])
.analyze();
expect(results.violations).toEqual([]);
});Template deduplication tip
An unlabeled sort_by <select> in snippets/facets.liquid fails across every /collections/* URL, and an unlabeled currency selector in sections/footer.liquid fails on every store page. Fix that one Liquid snippet to resolve the entire cluster.
What NVDA and VoiceOver announce
E-commerce variant pickers (Size, Color), collection sort dropdowns, and country selectors without a programmatic <label> or aria-label announce only the first option ('Featured' or 'Small'), hiding what the dropdown controls.
NVDA (Windows)
"combo box, Featured, collapsed" (purpose of selector unknown)
"Sort products by, combo box, Featured, collapsed"
VoiceOver (macOS / iOS)
"Featured, pop-up button"
"Sort products by, Featured, pop-up button"
Common questions
Why does Shopify's country/currency selector in footer.liquid often fail select-name?
<label for='FooterCountry-{{ section.id }}' class='visually-hidden'>Country/region</label> to bind an accessible name cleanly.How should multi-option Shopify product variants (Size + Color) be labeled?
id='Option-{{ section.id }}-{{ forloop.index0 }}') paired with <label for='...'>{{ option.name | escape }}</label> so Size and Color pickers each receive distinct labels.Does a default <option> like 'Select size' satisfy select-name?
Test a URL for select-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.