Access 10.4.1.1

From Htmlpedia
Jump to: navigation, search

Access: [10.4.1.1]: form control requires default text (Priority 3)

Cause:

Include default text for all <input> form controls. Placing default text in form fields enables keyboard users to insert a cursor into placeholder text or characters and enter their own data.

Example:

Bad
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/10.4.1</title>
</head>
<body>
<form action="">
<label for="control1">Some text:</label>
<input id="control1" type="text" />
</form>
</body>
</html>

Solution:

Good
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/10.4.1</title>
</head>
<body>
<form action="">
<label for="control1">Some text:</label>
<input id="control1" type="text" value="the default text"/>
</form>
</body>
</html>

References: