Image button must have alt. content

Rule ID Control 2
Definition Every input type image element must have an alt or title attribute with content.
Purpose
  • Alternate content associated with an image-based form control ensures that information about the control is spoken by screen readers when it receives focus.
Required Yes for HTML5 and ARIA Techniques ruleset mapping
WCAG Success Criteria

3.3.2 Labels or Instructions (Level A, Primary Success Criterion)

Rule Category Forms
Scope Element
Target Resources input[type="image"] elements
Techniques
  • The alt attribute is the preferred and most commonly used way to provide an accessible label for input type image elements.
  • In special cases, the title attribute can be used on the input type image element to provide an explicit text description of its purpose.
  • In special cases, the aria-labelledby attribute can be used on the form control element to reference the id(s) of the elements on the page that describe its purpose.
  • In special cases, the aria-label attribute can be used on the form control element to provide an explicit text description of its purpose.
Informational Links