How to Fix Buttons Without Accessible Names on Your Site
Buttons with no accessible name, usually icon-only menu, search, close, cart or slider arrows, are read aloud by screen readers as just "button", so users cannot tell what they do. This guide shows you how to find every unnamed button and `<input type="button">` on your site, give each one a clear name using visible text, a visually hidden label or `aria-label`, and confirm the fix.

Why it matters
2 Name, Role, Value) and one of the most common accessibility issues found on real sites. Screen reader and voice-control users cannot operate controls they cannot identify. A user cannot say "click menu" if the button has no name, and those users may abandon checkout, search or navigation.
The same names are used by browser accessibility trees, automated agents and AI assistants that interact with your pages. Legal accessibility complaints often cite this issue because automated tools detect it reliably. The fix is usually one attribute per button.
What you need
Step-by-step fix
Find every button without a name
Open a key page, press F12, open the axe DevTools tab and click Scan ALL of my page. Look for two issues: Buttons must have discernible text and Input buttons must have discernible text. Click Highlight on each result to see which element it is.
Repeat this on your header, footer, product pages, cart drawer, cookie banner and any open modal, because hidden UI is only tested when it is visible.
Choose visible text or a hidden label
For each failing button, decide how to name it:
- Visible text is best when there is room, such as "Search" or "Add to cart".
- aria-label works for icon-only buttons such as hamburger, close, arrows and social share.
- aria-labelledby works when a visible heading or text elsewhere already describes the action.
Write the name as the action, not the icon: "Close cart", not "X" or "icon".
Name icon-only buttons and hide the icon
Put aria-label on the <button> itself, not on the SVG or <i> inside it. Add aria-hidden="true" to the decorative icon so it is not read twice. Toggle buttons such as menus should also expose their state with aria-expanded.
<button type="button" class="menu-toggle" aria-label="Open menu" aria-expanded="false" aria-controls="site-nav"> <svg aria-hidden="true" focusable="false" width="24" height="24">…</svg> </button> <button type="button" class="modal-close" aria-label="Close newsletter signup"> <span aria-hidden="true">×</span> </button>
Use a visually hidden text class where it suits
An alternative to aria-label is real text that is hidden visually but still read by screen readers. Do not use display:none or visibility:hidden for this, because text hidden that way is removed from the accessible name and the button will still fail.
<style>
.visually-hidden{position:absolute!important;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" class="search-toggle">
<svg aria-hidden="true" focusable="false">…</svg>
<span class="visually-hidden">Search example.com</span>
</button>Fix input buttons and fake buttons
An <input type="button"> takes its name from its value attribute. If value is empty or missing, the button fails. Elements with role="button", such as a clickable <div> or <span>, are tested the same way as real buttons.
Give them text or an aria-label. Better still, replace them with a real <button> so they also get keyboard support.
<!-- Fails --> <input type="button" class="qty-plus"> <div role="button" class="slider-next"></div> <!-- Passes --> <input type="button" class="qty-plus" value="+" aria-label="Increase quantity"> <button type="button" class="slider-next" aria-label="Next slide"><svg aria-hidden="true">…</svg></button>
Apply the fix in the shared template, not page by page
Most unnamed buttons come from a few shared components: header, mobile menu, cart drawer, carousel, quantity selector and cookie banner. Fix them once in the theme file or component so every page inherits the fix. For buttons that come from plugins or apps, check the plugin's settings for a label option first.
Otherwise, contact the vendor or override the plugin's template.
Re-scan and check the computed name
Reload the page and run axe DevTools again. The button-name and input-button-name issues should be gone. Then inspect one fixed button.
In DevTools, open Elements > Accessibility and confirm that Computed Properties > Name shows your label and that Role is "button". Finally, run our audit again on the same URLs.
Platform-specific notes
WordPress
Theme icon buttons usually live in header.php, template-parts/header/*.php, or for block themes in Appearance > Editor > Patterns/Template Parts. Edit these in a child theme so updates don't overwrite your fix. Block Editor Button blocks with no text fail the check, so add text or delete them. For translatable labels, use `aria-label="<?php esc_attr_e( 'Open menu', 'textdomain' ); ?>"`. Slider, popup and WooCommerce mini-cart plugins are frequent sources of unnamed buttons; check each plugin's accessibility settings or override its template in your theme.
Shopify
Go to Online Store > Themes > ... > Edit code. Header, cart drawer and quantity buttons are usually in sections/header.liquid, snippets/cart-drawer.liquid and snippets/quantity-input.liquid. Use translation keys so labels follow the store language, for example `aria-label="{{ 'accessibility.close' | t }}"`, and add the key to locales/en.default.json. Buttons injected by apps (reviews, chat, wishlist) must be fixed in the app's settings or by the app developer.
Wix
You cannot edit button HTML directly. Select an icon button in the Editor, click Settings or the Accessibility option (where offered), and set the accessible label. Wix Studio offers an ARIA attributes panel on many elements. Run Settings > Accessibility Wizard to list remaining issues. Some built-in widgets cannot be changed; report these to Wix support.
Webflow
Select the Button or Link Block, open the Element Settings panel (gear icon), and under Custom Attributes add Name `aria-label` with a Value such as `Open menu`. For the Navbar component's Menu Button, set the attribute on the menu button element itself, not on the icon inside it. Publish the site before re-testing, because the Designer preview may not reflect published markup.
Next.js / React
Pass `aria-label` on the `<button>` element, and set `aria-hidden` on icon components from libraries such as lucide-react or Heroicons (many already set it). Make shared IconButton components require a `label` prop in TypeScript so unnamed buttons cannot ship. Add eslint-plugin-jsx-a11y (rule `control-has-associated-label`) and @axe-core/playwright tests to catch regressions in CI.
Check that it worked
✅ How to verify
- Run axe DevTools on each key template and confirm no "Buttons must have discernible text" or "Input buttons must have discernible text" issues remain, with menus, drawers and modals open.
- In Chrome DevTools, open Elements > Accessibility and check that the Computed Name of each fixed button is a meaningful action.
- Run Lighthouse (DevTools > Lighthouse > Accessibility) and confirm "Buttons do not have an accessible name" no longer appears.
- Tab through the page with NVDA (Windows) or VoiceOver (Cmd+F5 on Mac) and listen for each button to be announced by its name, e.g. "Open menu, button".
⚠️ Common mistakes
- Putting aria-label on the inner <svg> or <i> icon instead of the <button>. The button itself must have the name.
- Hiding the label text with display:none or visibility:hidden. Text hidden this way is excluded from the accessible name, so use a visually-hidden class instead.
- Using vague labels like "button", "icon", "click here" or duplicate "More" labels that pass the automated check but still don't tell users what happens.
- Adding an aria-label that contradicts the visible text, for example a button showing "Buy" labeled "Submit form", which breaks voice control.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
What does "button does not have an accessible name" mean?
It means assistive technology finds no text to announce for the button: no inner text, no aria-label, no aria-labelledby and no title. Screen readers then say only "button", leaving users to guess what it does.
Should I use aria-label or visually hidden text?
Both are valid. Visually hidden text is translated more reliably by translation tools and browsers. aria-label is quicker to add and works well for single-language sites. Visible text is better than either when the design has room.
Is a title attribute enough to name a button?
Automated tools accept a non-empty title as a fallback name. However, the tooltip only appears on mouse hover and is not shown on touch devices, so use aria-label or text instead and treat title as optional extra help.
Do submit buttons need an aria-label?
Not usually. <button type="submit">Subscribe</button> is named by its text, and <input type="submit"> gets a default name from the browser. A submit button only fails when it is icon-only or has an empty value attribute.
How to Fix Links Without Discernible Text on Your Site
How to Fix Form Fields Missing Labels for Accessibility
How to Fix a Missing or Invalid Page Language (html lang)
How to Fix Missing Image Alt Text for Accessibility
How to Fix a Missing or Empty Page Title Element
How to Fix Colour Contrast Errors (WCAG 1.4.3)