Fix guides · Accessibility
How to fix “Buttons do not have an accessible name” (icon buttons)
Icon-only buttons such as menu, close, search, cart and slider arrows are announced as just "button". How to name them on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.
- Time to fix
- 10–30 minutes
- Skill needed
- Copy and paste
- Who notices
- Screen reader and voice-control users
Why it matters
A button's name is what assistive technology reads out. An icon has no words, so a hamburger menu, a close X or a slider arrow is announced only as "button", and visitors have to guess what it does.
The same applies to image buttons (<input type="image">), which need alt text, and to elements made to act like buttons or links with role="button" or role="link".
“Screen reader users are not able to discern the purpose of elements with role="link", role="button", or role="menuitem" that do not have an accessible name.”
Before you start
- Your report shows each button that failed. Name it after what it does: "Open menu", "Close", "Next slide", "Search".
- Visible text is best. For icon buttons, add an aria-label or visually hidden text, and hide the icon itself from screen readers.
- Prefer a real <button> over a <div> with role="button"; it works with the keyboard automatically.
Fix it on your platform
Shopify
- Most themes already label their menu, cart and close buttons. If yours doesn't, the fix is in the theme code (Online Store → Themes → ⋯ → Edit code): add an aria-label to the button, or ask your theme developer.
- Shopify's theme accessibility guidance asks themes to use the button element for on-screen actions.
- Buttons added by apps (reviews, pop-ups, chat) are fixed by the app's developer.
<button type="button" aria-label="{{ 'general.accessibility.close' | t }}">
{% render 'icon-close' %}
</button>WordPress
- Block buttons get their name from their text; don't leave the Button block empty.
- Icon buttons from your theme or a plugin (menu toggles, slider arrows, cookie banners) are fixed in that tool's settings or by its developer.
Webflow
- For an icon-only button or link block, open Element settings → Custom attributes, click + and add aria-label with what the button does.
- Give buttons visible text where the design allows.
Wix
- Wix sets accessible names on its own elements. For icon buttons you've added, check the element's accessibility settings for a label, or add an ARIA label as Wix's help center describes.
- Run the Accessibility Wizard (Settings → Accessibility Wizard → Scan Site) to find remaining issues.
Squarespace
- Squarespace generates the code for its own buttons and icons. If those are flagged and there's no label setting, contact Squarespace support.
- Buttons in code injection or embeds need a name added in that code.
Next.js
- Give icon buttons an aria-label (or visually hidden text) and mark the icon as decorative.
<button type="button" aria-label="Open menu" onClick={openMenu}>
<MenuIcon aria-hidden="true" />
</button>Any other site
- Add text, an aria-label or visually hidden text to each button. Image buttons need alt text that describes the action.
<button type="button" aria-label="Close">
<svg aria-hidden="true" focusable="false">…</svg>
</button>
<input type="image" src="search.svg" alt="Search">Check that it's fixed
- Re-run your StudioLNC audit: the buttons should no longer be listed.
- With VoiceOver (Mac) or NVDA (Windows), tab to each button and listen to what it's called.
Find every issue like this on your site
Free audit of performance, accessibility, SEO and security, with fixes for your platform.