Language: EN

Buttons without a readable name

Message shown by axe and Lighthouse: Buttons must have discernible text · button-name · WCAG 4.1.2

What it means and why it matters

A button that only shows an icon (search, close, menu) is announced as "button" — its function stays unknown (WCAG 4.1.2).

How to fix it

Give the button text or an aria-label such as aria-label="Close".

Code example

Before

<button class="close"><span class="icon-x"></span></button>

After

<button class="close" aria-label="Close"><span class="icon-x" aria-hidden="true"></span></button>

In our study

Share of online shop home pages on which axe-core automatically detected at least one failure of this rule. The number of shops is in brackets.

Buttons without a readable name

CountryShops checkedWith this failure
Poland8431 (37%)
Czechia8627 (31%)
Slovakia9425 (27%)
Croatia9227 (29%)
Total, wave 1356110 (31%)
Germany12328 (23%)
Austria9726 (27%)
Total, wave 222054 (25%)
Netherlands10016 (16%)
Spain9432 (34%)
France10127 (27%)
Italy10126 (26%)
Total, wave 3396101 (26%)

Where the fix usually lies (a general guide, not a measurement): theme code (theme components); third-party code and apps (apps and plugins).

Method, limits and all results: Online shop study.

Other common errors in online shops

Find this error on your website

Run a free check of any page — results in seconds, with fix instructions.

Check a page for free

All accessibility errors

Order a paid plan

Leave your email and we'll contact you as soon as the plan can be ordered.