Access: [10.2.1.1]: <label> needs repositioning (<label> before <input>) (Priority 2)
Cause:
Create a clear association between a form control and its label by ensuring labels are positioned
properly within HTML markup. Do not separate a label from its form control with additional text, images, etc. If there are two or more controls on a single line, labels should be placed
immediately before their corresponding controls. Alternatively, place each label and control on a separate line.
Example:
 | <!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.2.1</title>
</head>
<body>
<form action="">
<label for="control1">Some text:</label>
Text between control and label.
<input id="control1" type="text" />
</form>
</body>
</html>
|
 | <!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.2.1</title>
</head>
<body>
<form action="">
<label for="control1">Some text:</label>
<input id="control1" type="text" />
</form>
</body>
</html>
|
Solution:
References: