What This Rule Checks
Every input button (e.g., submit, reset, or custom buttons) must have a clear and discernible name that describes its purpose. This name is essential for assistive technology users, such as those relying on screen readers, to understand the button’s function.
Who Is Affected
This issue primarily affects: Blind users, who rely entirely on screen readers or braille displays to navigate and interact with content; Deafblind users, who rely on braille displays and cannot access visual or auditory content.
Why This Matters
Input buttons without discernible text are announced as “button” with no context about what action they perform. This is a WCAG 4.1.2 violation. Screen reader users cannot distinguish between multiple unlabeled buttons on a form.
How to Fix
To ensure input buttons are accessible, each button must have a clear and discernible name that conveys its purpose. You can provide this name through the value, aria-label, aria-labelledby, or a combination of these attributes.
It’s important to avoid buttons that lack a clear label or rely on incorrectly configured attributes, as this makes them inaccessible to screen reader users and other assistive technologies.
Code Examples
<!-- Input button with no value -->
<input type="submit">
<!-- Input button with empty value -->
<input type="button" value="">
Copy
<!-- Input button with descriptive value -->
<input type="submit" value="Create Account">
Copy
<!-- Or use aria-label -->
<input
type="button"
value=""
aria-label="Search">
Copy
Common Mistakes to Avoid
- Relying on the browser default “Submit” text which may not describe the action.
- Using empty value attributes on input buttons.
- Not providing aria-label when the visual button uses only an icon or image.
AI Auto-Fix Available
This rule supports ACE™ AI Auto-Fix. When a violation is detected, ACE can automatically generate a code fix for review. The AI analyzes the specific element in context and proposes a targeted remediation that preserves your existing markup and styling. You can preview, modify, and approve the fix before it is applied.
Tip: Form accessibility is one of the most common sources of accessibility complaints. Every form control must have a programmatically associated label that is visible and descriptive. Test every form with keyboard-only navigation.
Related WCAG Criteria
- 4.1.2: Name, Role, Value