Empty Button Tags
WCAG Focus: WCAG 4.1.2 (A), 1.1.1 (A)
Mobile menu hamburgers, carousel Prev/Next arrows, and search submit icons often render as <button><span class="icon"></span></button> with zero visible text. To a screen reader, an empty button announces simply as "button" with no clue what clicking it will do.
Why This Pattern Violates WCAG
WCAG 4.1.2 Name, Role, Value (Level A) requires every button control to expose a clear, programmatic accessible name.
Without visible text, screen-reader-only text, or an aria-label, non-sighted users cannot operate the control.
Code Comparison
Inaccessible Empty Hamburger Button
<button type="button" class="menu-toggle"><span class="dashicons dashicons-menu"></span></button>
Compliant Labeled Icon Button
<button type="button" class="menu-toggle" aria-label="Open navigation menu" aria-expanded="false">
<span class="dashicons dashicons-menu" aria-hidden="true"></span>
</button>
How to Fix It in WordPress
- Add concise aria-label attributes or visually hidden <span> labels to every icon-only <button>.
- Remove stray empty <button></button> tags left behind by page builders or modal scripts.
Finding This Issue Automatically
Theme header toggles and slider plugins routinely render unlabeled icon buttons. The WP ADA Compliance Check plugin inspects every <button> across your WordPress site and flags empty button tags immediately so no interactive control goes unnamed.
Subscribe
Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

