Image button must declare alt text describing its action.
Description
An image button is an interactive control whose purpose is carried by a short text alternative, not by the picture on its surface. When an <input type="image"> has no alt, an empty alt, or an alt made only of spaces, screen reader users hear a generic button with no indication of what clicking it will do. WCAG Success Criterion 1.1.1 requires that alternative to describe the button’s action.
The automated audit examines every input[type="image"] element and reports three distinct failures: a missing attribute, an empty value, and a whitespace-only value. A meaningful label such as Search the catalog
restores the missing context, helps keyboard and voice-control users confirm the target before submitting, and keeps forms understandable in translated and zoomed layouts. The MDN guide to input type image documents the same behavior.
Disabilities impacted
- Blindness: Without a text alternative, an image-only submit control has no spoken name, so the action cannot be discovered through audio output.
- Low vision: Users who magnify or apply high contrast may see only a cropped graphic, so the descriptive label supplies the missing context in accessible output.
- Screen reader users: A missing, empty, or blank label produces
button
or silence, forcing guesswork about whether the control searches, saves, or deletes. - Cognitive disabilities: Clear action labels reduce uncertainty at form completion and support users who rely on predictable, descriptive wording.
- Motor impairments: People using switch access or voice commands need an announced name to target the correct control without accidental submission.
Why it matters
Text alternatives are the bridge between visual interface design and every non-visual way of using the web. For image submit buttons, the alt value becomes the accessible name, so a blank value removes the only reliable signal about form behavior. The W3C treats this as a baseline requirement, and the same habit supports screen readers, voice control, and automated conformance checks. Getting it right lowers support costs, reduces abandoned forms, and keeps interfaces compatible with accessibility procurement policies.
Coding problems and solutions
Common coding problems
- Missing attribute: Developers add
srcand dimensions to an image submit but forgetalt, leaving the control unnamed. - Empty value: An intentional
alt="", often copied from decorative image patterns, silently removes the label from an interactive element. - Whitespace-only value: Values such as
alt=" "pass a naive non-empty check yet are ignored by assistive technology. - Vague wording: Generic text like
Submit
orButton
announces the control type without describing the actual action. - Runtime injection: Framework code creates image buttons dynamically and sets the source after render, but never assigns a label.
How to fix it
Declare a descriptive alt on every image submit
<input type="image" src="/assets/search-submit.svg" alt="Search the catalog"><input type="image" src="/assets/search-submit.svg">Replace blank and whitespace-only values
<input type="image" src="/assets/place-order.png" alt="Place order and continue to payment"><!-- both variants are reported -->
<input type="image" src="/assets/place-order.png" alt="">
<input type="image" src="/assets/place-order.png" alt=" ">Use a native button for non-graphical actions
<button type="submit" class="btn btn-primary">Search the catalog</button><div class="search-submit" role="button"></div>Label image buttons created at runtime
const submit = globalThis.document.createElement('input');
submit.type = 'image';
submit.src = '/assets/subscribe.png';
submit.alt = 'Subscribe to the newsletter';
form.appendChild(submit);const submit = globalThis.document.createElement('input');
submit.type = 'image';
submit.src = '/assets/subscribe.png';
form.appendChild(submit);Known Limitations
- Label quality: The check verifies presence and non-whitespace content only; it cannot judge whether the wording truly describes the action.
- Selector scope: Only
input[type="image"]elements are inspected, so image-basedrole="button"controls, CSS background buttons, and linked images are out of scope. - Shadow DOM: Image buttons inside closed shadow roots may not be reached by the document-level query.
- Iframes: Controls hosted in cross-origin frames are not traversed by the audit.
- Dynamic content: Buttons injected after the scan, common in single-page applications, can be missed until a re-scan.
Resources
- WCAG criterion: Authoritative guidance on text alternatives is available in the Non-text Content understanding document.
- MDN guide: The input type image reference covers alt behavior and accessibility notes.
- WHATWG specification: The image button state defines how alt labels the control.
- W3C technique: H36 shows how to use alt on image submit buttons.
Rule
- Audit: accessibility
- Standard: WCAG
- Level: A
- Success Criteria: 1.1.1
- Rule ID:
input-image-missing-alt