Back

button-name

Buttons must have discernible text

Why it matters

An icon-only button with no accessible name is announced as just "button," so a screen reader user can't tell what it does before activating it.

How to fix it

Add visible text inside the button, or an aria-label when the button is icon-only.

Example

<button aria-label="Close dialog"><XIcon /></button>
Technical reference (Deque University)
Buttons must have discernible text | Pallyfi Accessibility Guidance