Buttons without a readable name
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
| Country | Shops checked | With this failure |
|---|---|---|
| Poland | 84 | 31 (37%) |
| Czechia | 86 | 27 (31%) |
| Slovakia | 94 | 25 (27%) |
| Croatia | 92 | 27 (29%) |
| Total, wave 1 | 356 | 110 (31%) |
| Germany | 123 | 28 (23%) |
| Austria | 97 | 26 (27%) |
| Total, wave 2 | 220 | 54 (25%) |
| Netherlands | 100 | 16 (16%) |
| Spain | 94 | 32 (34%) |
| France | 101 | 27 (27%) |
| Italy | 101 | 26 (26%) |
| Total, wave 3 | 396 | 101 (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
- Text has too little contrast
- Links without a readable name
- Touch targets are too small
- Images without alternative text
Find this error on your website
Run a free check of any page — results in seconds, with fix instructions.