Button name
Moderate effortFound on 19% of audited stores.
Add a visible or programmatically accessible name to every button so screen readers can announce what it does.
What it is
Every button on your store — including icon-only buttons like a cart icon, search magnifying glass, hamburger menu, or social share button — must have a text name that screen readers can read aloud. When a button contains only an image or an icon font (e.g. a heart symbol or an arrow), there is no visible text for assistive technology to announce, so blind and low-vision users hear something useless like "button" with no description. WCAG Success Criterion 4.1.2 requires all interactive controls to have an accessible name. This name can be visible text inside the button, an `aria-label` attribute, an `aria-labelledby` reference, or a visually-hidden text element — the screen reader just needs something meaningful to say.
Why it matters
Roughly 7–8% of online shoppers use assistive technology, and an unnamed button is a complete dead-end for them — they cannot add to cart, open the menu, or complete checkout if those buttons have no accessible name. Beyond lost conversions, this is a WCAG 2.1 Level A violation (the lowest, most-required level), meaning it exposes your store to legal complaints and ADA/Section 508 accessibility lawsuits, which have been rising sharply in ecommerce. Google's crawlers also parse ARIA labels and button text as page signals; cleaner, descriptive buttons contribute to better crawlability and can positively influence rankings. Fixing unnamed buttons is typically a quick, high-impact change that simultaneously removes legal risk, improves conversion for disabled users, and makes your site more professional.
How to fix it
- Identify every button that lacks visible text — look for icon-only buttons (cart, search, close ✕, hamburger ☰, arrows, social icons, play/pause) in your theme's HTML.
- For each button, choose the best accessible-name method: (a) add visible text inside the button tag, (b) add an aria-label attribute directly on the button element with a short descriptive label (e.g. aria-label="Add to cart"), (c) add a visually-hidden <span> inside the button (styled with a CSS class that positions text off-screen but keeps it in the accessibility tree), or (d) use aria-labelledby pointing to an existing descriptive element's id.
- Prefer visible text whenever the design allows it — this benefits all users, not just screen-reader users. Use aria-label only when adding visible text would break the visual design.
- If the button contains a meaningful <img>, make sure that img has a descriptive alt attribute; if it contains an SVG icon, add aria-hidden="true" to the SVG and place the label on the button itself.
- After editing, validate with a free browser tool (axe DevTools Chrome extension, or WAVE) by inspecting the button — confirm the Accessibility panel shows a non-empty 'Accessible Name'.
- Test with an actual screen reader (NVDA + Firefox on Windows, or VoiceOver + Safari on Mac/iOS) to confirm the button is announced with a meaningful label before shipping.
<!-- ✅ Option 1: Visible text (best) -->
<button type="button">Add to cart</button>
<!-- ✅ Option 2: aria-label on an icon-only button -->
<button type="button" aria-label="Open search">
<svg aria-hidden="true" focusable="false">...</svg>
</button>
<!-- ✅ Option 3: Visually-hidden span (text in DOM, hidden visually) -->
<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 type="button">
<svg aria-hidden="true" focusable="false">...</svg>
<span class="sr-only">Open cart</span>
</button>
<!-- ❌ Broken: icon font with no label -->
<button type="button"><i class="icon-cart"></i></button>Fix it on your platform
Pick your platform for the exact steps.
How to fix button name on Shopify
- From your Shopify Admin, go to Online Store → Themes → click the three-dot menu next to your active theme → Edit code.
- In the Layout / Sections / Snippets folders, open the file that contains the offending button (common culprits: header.liquid, cart-icon.liquid, product-form.liquid, icon-*.liquid snippets).
- Locate the <button> tag. If it only contains an icon, add aria-label="Descriptive name" directly on the opening tag, e.g. <button type="button" aria-label="Open cart">.
- If the button uses an inline SVG, add aria-hidden="true" focusable="false" to the <svg> tag so screen readers ignore the graphic and read the button's aria-label instead.
- Alternatively, add a visually-hidden <span class="visually-hidden">Open cart</span> inside the button — Shopify's default themes already ship a .visually-hidden CSS class you can reuse.
- Click Save, then preview in a browser and verify with the axe DevTools extension or Chrome's Accessibility panel.
How to fix button name on Shopify Plus
- Same as Shopify above; additionally check any custom checkout.liquid (available on Plus) for unnamed icon buttons in the checkout header or upsell sections.
- For headless / Hydrogen storefronts, locate the relevant .jsx/.tsx component (e.g. CartIcon.jsx) and add aria-label to the <button> element in JSX.
How to fix button name on WooCommerce
- In WordPress Admin go to Appearance → Theme File Editor (or use a child theme via FTP/SFTP).
- Open the relevant template file — often header.php, woocommerce/cart/mini-cart.php, or a page-builder block — and find the <button> element.
- Add aria-label="Descriptive name" to the button tag, or insert <span class="screen-reader-text">Descriptive name</span> inside it — WooCommerce and most WordPress themes already define a .screen-reader-text CSS class.
- If you use a page builder (Elementor, Divi, etc.), switch to the HTML/code block for that button widget and add the aria-label attribute there.
- Install the free 'WP Accessibility' plugin as a helper — it adds screen-reader-text utilities and can audit some common issues automatically.
- Verify the fix with the axe browser extension after saving.
How to fix button name on BigCommerce
- In BigCommerce Admin go to Storefront → My Themes → click Customize on your active theme → click Advanced → Edit Theme Files (opens the Stencil file editor).
- Locate the template containing the button — typical paths: templates/components/cart/preview.html, templates/components/common/header.html, or templates/components/product/add-to-cart.html.
- Add aria-label="Descriptive name" to the <button> element, or add a <span class="u-hidden-visually">Descriptive name</span> inside it (BigCommerce Cornerstone theme ships this utility class).
- Save and publish, then verify with axe DevTools in your browser.
How to fix button name on Wix
- Open the Wix Editor for your site. Click directly on the button element that is failing.
- In the button settings panel, check whether a 'Tooltip' or 'ARIA Label' field is available (Wix has been rolling out accessibility properties) — if so, fill in a descriptive label.
- If no ARIA field is available for that widget type, use the 'Custom Code' section (Settings → Custom Code → Head) to inject a JavaScript snippet that adds aria-label attributes to specific buttons by their selector after page load (e.g. document.querySelector('.cart-icon-button').setAttribute('aria-label', 'Open cart');).
- For Wix Studio, use the Dev Mode / Velo editor to directly manipulate element properties and set accessibility attributes on components.
- Verify with WAVE or axe DevTools after publishing.
How to fix button name on Wix Studio
- Open your project in Wix Studio. Select the button component on the canvas.
- In the Properties panel on the right, look for the 'Accessibility' section and enter a descriptive label in the 'ARIA Label' field.
- If editing a custom-coded section, open the code panel and add aria-label="Descriptive name" directly in the JSX or HTML of the component.
- Use Velo (the Wix dev environment) for dynamic buttons: e.g. $w('#myButton').setAttribute('aria-label', 'Open cart');
- Publish and validate with the axe browser extension.
How to fix button name on Squarespace
- Squarespace has limited direct HTML editing. Go to Website → Pages, open the page with the offending button, and click Edit.
- If the button is inside a Code Block, click the code block and add aria-label="Descriptive name" to the <button> tag in the HTML.
- For theme-level buttons (navigation, cart icon), go to Website → Custom CSS (or Design → Custom CSS) — you cannot add ARIA attributes via CSS, so instead use Settings → Advanced → Code Injection → Footer to add a JavaScript snippet: document.querySelectorAll('.cart-btn').forEach(el => el.setAttribute('aria-label', 'Open cart'));
- Use the most specific CSS selector you can find in browser DevTools to target only the correct button(s).
- Verify with axe DevTools after saving.
How to fix button name on Webflow
- Open the Webflow Designer. Select the button element on the canvas.
- In the right-hand Settings panel (the gear icon), scroll to the 'Accessibility' section. Enter a descriptive label in the 'ARIA Label' field — Webflow natively supports this for Button elements.
- For icon-only buttons built with a Div + click interaction (not a semantic Button element), change the element to a Button tag via the Element settings, then set the ARIA Label.
- If the button contains an SVG, select the SVG in the designer and in its Settings panel set 'aria-hidden' to 'true' so the label on the button is the sole accessible name.
- Publish the site and verify with axe DevTools.
How to fix button name on Adobe Commerce (Magento)
- In your custom theme directory (app/design/frontend/<Vendor>/<theme>/), locate the relevant .phtml template — common files: Magento_Checkout/templates/cart/minicart.phtml, Magento_Search/templates/form.mini.phtml, Magento_Catalog/templates/product/view/addtocart.phtml.
- Find the <button> element and add aria-label="Descriptive name" as an HTML attribute, or insert a <span class="amasty-sr-only"> / <span class="action"> element with visually-hidden CSS.
- If using UI Components or Knockout.js templates (*.html in web/template/ directories), add the aria-label binding: <button ... attr="aria-label: 'Open cart'">.
- Run bin/magento cache:clean after saving template changes, then verify with axe DevTools in the browser.
How to fix button name on Magento Open Source
- Follow the same steps as Adobe Commerce above — template paths and cache-clearing commands are identical for Magento Open Source.
How to fix button name on PrestaShop
- In your theme directory (themes/<your-theme>/templates/), locate the relevant .tpl file (e.g. _partials/header.tpl, catalog/product.tpl).
- Find the <button> element and add aria-label="{l s='Descriptive name' d='Shop.Theme'}" using PrestaShop's translation helper.
- Clear the PrestaShop cache under Advanced Parameters → Performance → Clear Cache, then verify with axe DevTools.
How to fix button name on OpenCart
- Navigate to your theme folder: catalog/view/theme/<your-theme>/template/. Open the relevant .twig or .tpl file (e.g. common/header.twig, product/product.twig).
- Locate the <button> element and add aria-label="Descriptive name" to the tag.
- Save, refresh the store cache if applicable, and verify with axe DevTools.
Does your site have this issue?
Run a free SEOLZ audit to find button name — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Button name?
Every button on your store — including icon-only buttons like a cart icon, search magnifying glass, hamburger menu, or social share button — must have a text name that screen readers can read aloud. When a button contains only an image or an icon font (e.g. a heart symbol or an arrow), there is no visible text for assistive technology to announce, so blind and low-vision users hear something useless like "button" with no description. WCAG Success Criterion 4.1.2 requires all interactive controls to have an accessible name. This name can be visible text inside the button, an `aria-label` attribute, an `aria-labelledby` reference, or a visually-hidden text element — the screen reader just needs something meaningful to say.
Why does button name matter?
Roughly 7–8% of online shoppers use assistive technology, and an unnamed button is a complete dead-end for them — they cannot add to cart, open the menu, or complete checkout if those buttons have no accessible name. Beyond lost conversions, this is a WCAG 2.1 Level A violation (the lowest, most-required level), meaning it exposes your store to legal complaints and ADA/Section 508 accessibility lawsuits, which have been rising sharply in ecommerce. Google's crawlers also parse ARIA labels and button text as page signals; cleaner, descriptive buttons contribute to better crawlability and can positively influence rankings. Fixing unnamed buttons is typically a quick, high-impact change that simultaneously removes legal risk, improves conversion for disabled users, and makes your site more professional.
How do I fix button name?
Add a visible or programmatically accessible name to every button 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
- Web accessibility tutorials — W3C WAI
- ARIA basics — MDN