Using button and images
Every form has some kind of 'submit' button. Some times you just don't want
to use the standard control for the submit button, or you don't want to style
it. You might use an image. Or, you might use button.
How do you make sure that whatever type of button you use is accessible?
- The standard 'submit' control is
self-labeling. No other labeling is necessary. The text on the 'submit
button' is read by screen readers, and will scale with changes in font-size.
- If you use an image as a 'submit button', you MUST use
the 'alt' attribute on the image.
- If you use the <button> control (container) any text within will appear
on the screen and be read.
- If you include an image in the <button>, you MUST use
the 'alt' attribute on the image.
The Form
The HTML
<input type="submit" value="Submit">
<input type="image" name="search" src="search.gif" alt="Search Now!" />
<button name="submit" type="submit">
<img src="images/search03go.gif" alt="Go" />
Search Now!
</button>