Technique H36:Using alt
attributes on images used as submit buttons
About this Technique
This technique relates to 1.1.1: Non-text Content (Sufficient).
This technique applies to content using image-based submit buttons.
Description
For input elements of type image
, the alt
attribute of the input
element is used to provide a functional label. This label indicates the button's function, but does not attempt to describe the image. The label is especially important if there are multiple submit buttons on the page that each lead to different results.
Examples
Example 1: An input
element with an alt
attribute
<form action="/find" method="post" role="search">
<label for="look-up">Find books<label>
<input id="look-up" type="text">
<input alt="Search" src="button.gif" type="image">
</form>
Related Resources
No endorsement implied.
Tests
Procedure
- For all
input
elements that have a type attribute value ofimage
, check for the presence of analt
attribute. - Check that the value of the
alt
attribute describes the button's function.
Expected Results
- #1 and #2 are true