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>

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.