Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Icon-only buttons without accessible names: how to fix them

PRF-324Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An accessible name is the text that assistive technology, such as a screen reader or voice control, uses to identify a control. For a button, it normally comes from the text inside it. If the button holds only an icon (an SVG, an icon font or an image with no alt text), there is no text, so the name is empty.

Typical culprits are the hamburger menu, search magnifier, cart bag, close X, quantity plus and minus, social share icons, and carousel arrows. This fails WCAG 4.1.2 (Name, Role, Value) and often 1.1.1 (Non-text Content) too. Automated tools report it as 'Buttons must have discernible text'.

Why it costs you leads or sales

A screen reader user who reaches your cart or menu button hears only 'button'. They cannot tell the cart from the search or the close control, so they may leave. Voice control users hit the same wall: saying 'click cart' does nothing when the button has no name.

The risk sits on key funnel steps: open menu, search, add to cart, quantity, close popup, submit. It can also bring legal exposure in markets where accessibility rules apply to commerce sites. The impact is medium because most visitors can still see the icon and click it.

Where a nameless icon button breaks a purchase
  1. Product pagePage loads and reads fine
  2. Cart icon buttonAnnounced only as 'button'
  3. CheckoutNever reached
  4. OrderSale lost

A screen reader user cannot identify the cart button, so later steps are never reached.

How to check if your site has it

Find icon-only buttons without names
  1. Run an automated scan

    Use axe DevTools, WAVE or Lighthouse (Chrome DevTools, Accessibility category). Look for 'Buttons must have discernible text' (axe rule button-name) or 'Buttons do not have an accessible name' in Lighthouse. Also check 'Links must have discernible text' for icon links.

  2. Inspect the accessibility tree

    In Chrome DevTools, select the button in Elements, open the Accessibility pane and read the Name field. An empty name means the problem is present.

  3. Listen with a screen reader

    Tab through the header, product page, cart and popups with VoiceOver (Mac/iOS), NVDA (Windows, free) or TalkBack (Android). Note every control announced only as 'button'.

  4. Try voice control

    With Voice Control or Voice Access on, say 'show names' and check that every icon button displays a label.

How to fix it

Pick the first option that suits the design. Visible text is best because it helps everyone. Use aria-label when the icon is universally understood and there is no room for text. Hide the icon itself from assistive tech so it is not read twice.

Three ways to name an icon buttonhtml
<!-- 1. Visible text (best) -->
<button type="button">
  <svg aria-hidden="true" focusable="false" width="20" height="20">...</svg>
  Cart
</button>

<!-- 2. Visually hidden text -->
<button type="button">
  <svg aria-hidden="true" focusable="false" width="20" height="20">...</svg>
  <span class="visually-hidden">Open menu</span>
</button>

<!-- 3. aria-label -->
<button type="button" aria-label="Close dialog">
  <svg aria-hidden="true" focusable="false" width="20" height="20">...</svg>
</button>
Visually hidden helper classcss
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
Fix by platform
  1. Check the theme or builder setting

    In Elementor, select the icon button or Icon widget, open Advanced > Attributes and add aria-label|Open menu. In Gutenberg, select the block, open Advanced and use the HTML anchor or edit as HTML to add aria-label.

  2. Edit theme templates

    For header icons in a classic theme, edit the template (a child theme is safer) and add aria-label to the button. Update or contact the theme author if the icon is built in.

How to confirm it's fixed

Confirmation checks
  • Rescan with axe, WAVE or Lighthouse and see no 'discernible text' errors for buttons or links
  • Accessibility pane in DevTools shows a clear Name for each icon button
  • Screen reader announces each control with a purposeful name and the role 'button'
  • Icons are not announced twice (aria-hidden on the SVG)
  • Voice control 'show names' displays a label on every icon button
  • Labels are translated on every language version of the site
What a screen reader says

Before

  • Cart icon announced as 'button'
  • Menu icon announced as 'button'
  • Close X announced as 'button'

After

  • 'Cart, button'
  • 'Open menu, button'
  • 'Close dialog, button'

How to prevent it happening again

Prevention habits
  • Use one shared icon button component that demands a label
  • Add an accessibility linter (such as eslint-plugin-jsx-a11y) or axe to your CI build
  • Run an accessibility scan after every theme update, plugin install or redesign
  • Add 'accessible name' to your design handoff checklist for every icon
  • Test the header, cart and popups with a screen reader before launches

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard runs your real customer journeys on a schedule and checks steps, tracking hits and lead delivery. It does not audit markup for accessible names. The kind of tool that fits is an accessibility scanner such as axe DevTools, WAVE or Lighthouse, ideally combined with a manual screen reader test.

FunnelGuard can still help with the wider funnel: if an icon button is also broken in a way that stops the journey, such as a cart button that does nothing, a scheduled run can show the journey failing. You can start with the Free plan (1 site, 2 journeys, daily checks, no card).

Questions people ask

Why does my screen reader just say 'button'?

The button has no accessible name. It probably contains only an icon, image or SVG without text. Add visible text, hidden text or an aria-label so the screen reader has something to read.

How do I add an accessible name to an icon button?

Add aria-label="Close" to the button, or place a visually hidden span with text inside it. Mark the SVG as aria-hidden="true" so it is not read twice. Visible text beside the icon is the best option.

Is aria-label or visually hidden text better?

Both work. Visually hidden text is easier for automatic translation tools and is read reliably. aria-label is shorter to write. Choose one per button, not both.

What does 'Buttons must have discernible text' mean?

It is an axe rule (button-name) saying a button has no text a screen reader can use as its name. Fix it by adding text, aria-label or aria-labelledby to the button.

Does a title attribute count as an accessible name?

Technically it can be used as a fallback name, but it is unreliable on touch devices and with some assistive tech. Use aria-label or real text instead.

Which WCAG rule do icon-only buttons without names break?

Mainly WCAG 4.1.2 Name, Role, Value, and often 1.1.1 Non-text Content. Voice control users are affected under 2.5.3 Label in Name when visible and accessible names differ.

Can FunnelGuard detect icon buttons without accessible names?

No. This needs an accessibility scanner such as axe, WAVE or Lighthouse. FunnelGuard checks that your funnel journeys, tracking and lead delivery work, not markup accessibility.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.