'Images as submit buttons'에 해당되는 글 1건

  1. 2010.11.22 Images as submit buttons
반응형
Images as submit buttons

This technique relates to the following sections of the guidelines:

Task:

Avoid using images with onclick="form.submit()" as submit buttons.

A submit button is a submit button, and an image is an image. There is no need to mix the two. However, it is very common to see the following code, which leaves users of screen readers and people who can't use a mouse completely unable to submit their form:

Deprecated Example:

 
<form>
<img src="submit.gif" alt="Submit this form" onclick="submitmyform()">
</form>

Example:

The example below shows how to create an image-based submit button that is compatible with assistive technology:

 
<form>
<input type="image" name="submit" src="submit.gif" alt="Submit this form">
</form>
Posted by 1010