Fix · Serious · cited in audits
How to fix: empty buttons / icon-only buttons
Screen reader announces "button" with no purpose. Buttons need a programmatic name.
- WCAG references
- 4.1.2
- Severity
- Serious
What it looks like in the wild
Screen reader announces "button" with no purpose.
The screen-reader user, keyboard user, or low-vision user encountering this issue does not get an error message. The page just stops working for them. Which is why this kind of bug rarely shows up in your error tracker; it shows up in support tickets, lawsuits, and abandoned conversions.
Why it fails WCAG
Buttons need a programmatic name.
Map this back to 4.1.2 when you log the bug. Auditors and procurement teams expect that mapping; "broken" is not enough context.
The wrong pattern (avoid)
<button><svg>...</svg></button>The right pattern (copy this)
<button aria-label="Open notifications">
<svg aria-hidden="true">...</svg>
</button>Notes from real audits
aria-hidden on the SVG prevents double announcement.
How to verify the fix
Shipping the change is not the same as passing 4.1.2. Re-run these checks against the page you edited before you close the ticket.
Inspect components with the browser accessibility tree (Chrome DevTools → Accessibility).
An automated scan confirms the machine-testable half. Keyboard and screen-reader passes cover the half no scanner can judge — do both before claiming conformance.
What 4.1.2 requires
4.1.2 Name, Role, Value (Level A, Robust): For every UI component, the name, role, and state (and any value where applicable) must be programmatically determinable. A custom toggle that looks like a switch but is built from <div>s is invisible to assistive tech. WCAG 4.1.2 is the bridge between custom UI and the accessibility tree.
<div role="button"> without aria-label
4.1.2Toggle state not reflected in aria-pressed
4.1.2Custom dropdown without combobox role
4.1.2
Priority: Serious
This is one of the findings that shows up in demand letters, because the barrier it creates is total rather than inconvenient: the affected user cannot complete the task at all. Treat it as a release blocker, not a backlog item.
Because the cause is almost always a shared component rather than a single page, fix it where the component is defined and re-scan the whole site. Record 4.1.2 on the ticket verbatim: that string is what an auditor, a procurement questionnaire or a regulator will search for.
Related fixes
How to fix: auto-playing video with sound
1.4.2
How to fix: data table without headers
1.3.1
How to fix: invisible focus indicator
2.4.7
How to fix: ARIA misuse and conflicting roles
4.1.2
WCAG 4.1.2 — Name, Role, Value
For every UI component, the name, role, and state (and any value where applicable) must be
All fix recipes
Browse fixes by severity
Find every accessibility issue on your site in 60 seconds.
Free public scan. No card. AI-generated fixes for every issue we find.