SIA-R28<input type="image"> elements have an accessible name

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that image buttons have an accessible name.

Applicability

This rule applies to every <input> element in the HTML namespace with a type attribute in the Image Button state where the element is included in the accessibility tree.

The specification of the type attribute describes in detail how to map the value of the attribute to its corresponding state.

Expectations

  1. The element has an accessible name that is not empty.

Assumptions

This rule makes the following assumption:

Accessibility support

This rule has the following accessibility support concern:

Examples

Passed

This image button has an accessible name that is not empty and therefore passes the rule:

<input type="image" name="submit" src="button.gif" alt="Submit" />

Failed

This image button has no accessible name and therefore fails the rule:

<input type="image" name="submit" src="button.gif" />

Inapplicable

This image button is not included in the accessibility tree and is therefore inapplicable:

<input type="image" name="submit" src="button.gif" aria-hidden="true" />

Acknowledgments

This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/image-button-accessible-name-59796f/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).