Aria toggle field name
Moderate effortGive every toggle control (checkbox, switch, or ARIA toggle button) a descriptive accessible name so screen readers can announce what it does.
What it is
An "accessible name" is the text a screen reader speaks aloud when a user focuses on an interactive control. Toggle fields — checkboxes, toggle switches, and buttons with `role="switch"` or `aria-pressed` — must each have a clear, unique label that describes exactly what the toggle does. This is WCAG Success Criterion 4.1.2 (Name, Role, Value). When a toggle has no accessible name, a screen reader user hears something useless like "checkbox" or "button" with no explanation of its purpose.
Why it matters
Screen reader users — a significant portion of shoppers with visual or motor disabilities — cannot use your site if controls lack accessible names. In many countries (including the US under the ADA, and the EU under EAA/EN 301 549) this is a legal accessibility requirement, and lawsuits over inaccessible e-commerce sites are common and costly. Beyond legal risk, roughly 7–8 million Americans use screen readers; unnamed toggles are a complete conversion blocker for them. Google also factors accessibility into site quality signals, so persistent WCAG failures can indirectly hurt your search rankings.
How to fix it
- Identify every toggle control on the page: standard checkboxes (<input type='checkbox'>), custom toggle switches (often a <div> or <span> styled as a switch), and buttons using aria-pressed or role='switch'.
- For standard HTML checkboxes, wrap the input in a <label> element or add a matching 'for' attribute on a separate <label> that references the input's 'id'. This is always the preferred approach.
- For icon-only or visually hidden toggle buttons (e.g. a sun/moon icon for dark mode), add an aria-label attribute directly on the element with a short, descriptive phrase (e.g. aria-label='Toggle dark mode').
- For custom toggle components that already have visible text nearby but it is not programmatically linked, use aria-labelledby pointing to the id of the visible text element.
- For cases where a visible label is not desirable (purely icon-driven UI), add a visually-hidden span inside the element using a CSS class that hides text visually but keeps it in the accessibility tree (e.g. clip pattern).
- Test with a screen reader (NVDA + Chrome on Windows, VoiceOver + Safari on Mac/iOS) or re-run an automated axe/Lighthouse scan to confirm each toggle announces a meaningful name when focused.
<!-- Option 1: Standard checkbox with <label> -->
<label for="subscribe-newsletter">
Subscribe to newsletter
</label>
<input type="checkbox" id="subscribe-newsletter" name="subscribe">
<!-- Option 2: aria-label on a custom toggle button -->
<button role="switch" aria-checked="false" aria-label="Enable email notifications">
<span class="toggle-thumb"></span>
</button>
<!-- Option 3: aria-labelledby referencing visible text -->
<span id="wifi-label">Wi-Fi</span>
<div role="switch" aria-checked="true" aria-labelledby="wifi-label" tabindex="0"></div>
<!-- Option 4: Visually-hidden label text (CSS clip pattern) -->
<style>
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}
</style>
<button aria-pressed="false">
<span class="sr-only">Toggle dark mode</span>
🌙
</button>Fix it on your platform
Pick your platform for the exact steps.
How to fix aria toggle field name on Shopify
- In your Shopify admin, go to Online Store → Themes → click the three-dot menu next to your active theme → Edit code.
- Open the relevant template or section file where the toggle appears (e.g. sections/header.liquid, snippets/newsletter-popup.liquid, or templates/product.liquid for product option toggles).
- Locate the <input type='checkbox'> or custom toggle element. For a checkbox, ensure there is a <label for='...'> whose 'for' value exactly matches the input's 'id'. Add both attributes if missing.
- For a custom toggle <div> or <button>, add aria-label='Descriptive name here' directly on that element, or add aria-labelledby pointing to an existing visible text element's id.
- Save the file, preview the theme, and use Chrome DevTools Accessibility panel (Inspect → Accessibility tab) or an axe browser extension to confirm the accessible name appears.
How to fix aria toggle field name on WooCommerce
- In WordPress admin, go to Appearance → Theme File Editor (or use a child theme / FTP to avoid overwriting on update).
- Locate the template file containing the toggle: for checkout checkboxes it is typically woocommerce/checkout/form-checkout.php or a plugin template override in your theme's woocommerce/ folder.
- Add a <label for='field-id'> paired with an id attribute on the <input>, or use aria-label on any custom toggle widget.
- If the toggle is output by a plugin (e.g. a cookie consent or newsletter opt-in plugin), check that plugin's settings for a 'label text' field, or use a CSS + JS snippet in a child theme's functions.php to inject aria-label.
- Install the WP Accessibility plugin (by Joe Dolson) for additional helpers, then re-run an axe scan to verify.
How to fix aria toggle field name on BigCommerce
- In your BigCommerce control panel, go to Storefront → My Themes → click Customize on your active theme → click Advanced → Edit Theme Files.
- Find the Handlebars template containing the toggle (e.g. templates/components/form-fields/checkbox.html or the relevant page partial).
- Pair every <input type='checkbox'> with a <label for='...'> using matching id values, or add aria-label directly to a custom toggle button element.
- Save changes, then use the BigCommerce theme preview and an axe browser extension to verify the accessible name is present.
How to fix aria toggle field name on Wix
- Open the Wix Editor and click on the toggle or checkbox element on the canvas.
- In the element settings panel that appears, look for an 'Accessibility' or 'Settings' section — Wix exposes an ARIA label field for many interactive widgets.
- Enter a clear, descriptive label in the 'Accessible Name / ARIA Label' field (e.g. 'Subscribe to newsletter').
- If the element is embedded in custom HTML via an HTML Embed widget, click the widget → Enter Code and manually add aria-label='...' or a paired <label> to the markup.
- Publish the site and verify with the axe DevTools browser extension.
How to fix aria toggle field name on Squarespace
- In the Squarespace editor, click on the block or form containing the toggle/checkbox.
- For built-in Form Blocks: click Edit on the form, select the checkbox field, and fill in the 'Label' field — Squarespace renders this as a visible and accessible <label> linked to the input.
- For custom toggle UI added via a Code Block: click the block → Edit, and add aria-label='...' or a proper <label for='...'> pairing in the HTML.
- For site-wide custom CSS/JS injections (Squarespace Business plan or higher), go to Settings → Advanced → Code Injection and add a JS snippet that sets setAttribute('aria-label', '...') on targeted elements if template editing is not available.
- Preview and validate with the axe DevTools browser extension.
How to fix aria toggle field name on Webflow
- In the Webflow Designer, select the checkbox or toggle element on the canvas.
- Open the Element Settings panel (the gear icon on the right sidebar).
- Scroll to the 'Accessibility' section and fill in the 'Label' (aria-label) field with a descriptive name.
- For checkboxes that already have a visible text label next to them, ensure the label element is properly nested or linked: Webflow's native Checkbox component wraps the input in a label by default — confirm the label text is set in the element's text node.
- For custom toggle components built with Div blocks, add a custom attribute: in the Element Settings panel → Custom Attributes, add Name: aria-label, Value: 'Your descriptive label'.
- Publish the site and test with the axe DevTools browser extension.
How to fix aria toggle field name on Adobe Commerce (Magento)
- Identify the .phtml template or UI Component XML file rendering the toggle. Common locations: app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/ for checkout toggles, or a custom module's view/frontend/templates/ directory.
- For <input type='checkbox'>, ensure a <label for='...'> with matching 'for' and 'id' values is present in the template.
- For custom JavaScript toggle widgets (e.g. using Magento's UI Component or KnockoutJS bindings), add an aria-label binding: <button aria-label='...' data-bind="attr: {'aria-pressed': isActive}">.
- Clear the Magento cache after changes: in the admin go to System → Cache Management → Flush Magento Cache, or run bin/magento cache:flush from the CLI.
- Re-run an axe scan on the affected page to confirm the accessible name is detected.
Does your site have this issue?
Run a free SEOLZ audit to find aria toggle field name — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Aria toggle field name?
An "accessible name" is the text a screen reader speaks aloud when a user focuses on an interactive control. Toggle fields — checkboxes, toggle switches, and buttons with `role="switch"` or `aria-pressed` — must each have a clear, unique label that describes exactly what the toggle does. This is WCAG Success Criterion 4.1.2 (Name, Role, Value). When a toggle has no accessible name, a screen reader user hears something useless like "checkbox" or "button" with no explanation of its purpose.
Why does aria toggle field name matter?
Screen reader users — a significant portion of shoppers with visual or motor disabilities — cannot use your site if controls lack accessible names. In many countries (including the US under the ADA, and the EU under EAA/EN 301 549) this is a legal accessibility requirement, and lawsuits over inaccessible e-commerce sites are common and costly. Beyond legal risk, roughly 7–8 million Americans use screen readers; unnamed toggles are a complete conversion blocker for them. Google also factors accessibility into site quality signals, so persistent WCAG failures can indirectly hurt your search rankings.
How do I fix aria toggle field name?
Give every toggle control (checkbox, switch, or ARIA toggle button) a descriptive accessible name so screen readers can announce what it does.
Authoritative references
- How to fix this specific rule — Deque/axe (rule reference)
- WCAG 2 overview — W3C WAI
- Forms tutorial — W3C WAI
- ARIA basics — MDN