Element

input

Error Type

Potential

Guidelines

Requirement

Alt text for all input elements with a type attribute value of "image" identifies the purpose or function of the image.

Error

Image used for input element may have Alt text that does not identify the purpose or function as the image.

Short Description

input element with type of "image" must have Alt text that identifies the purpose or function of the image.

How To Determine

Question Does the Alt text identify the purpose or function of the image?
PASS Alt text identifies the purpose or function of the image.
FAIL Alt text does not identify the purpose or function of the image.

Steps To Check

Procedure

1. Check all input elements that have a type attribute value of "image".
2. Check the alt attribute value of the input element.

Expected Result

1. Alt text for all input elements with a type attribute value of "image" identifies the purpose or function of the image.

Failed Result

1. Modify the Alt text so it identifies the purpose or function of the image.

Examples

Pass Examples

input element, type of "image", has Alt text that identifies the purpose or function of the image.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ATRC Testfile - Check #59 - Negative</title>
</head>
<body>
<form action="http://example.com" method="post">
<p><input type="image" name="submit" src="rex.jpg" alt="search for cats" /></p>
</form>
</body>
</html>

Fail Examples

input element, type of "image", has Alt text that does not identify the purpose or function of the image.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>ATRC Testfile - Check #59 - Positive</title>
</head>
<body>
<form action="http://example.com" method="post">
<p><input type="image" name="submit" src="rex.jpg" alt="A brown and black cat named Rex." /></p>
</form>
</body>
</html>

English | German | Italiano


Web site engine's code is copyright © 2011
Inclusive Design Institute
Web Service API