What does this error mean?

liunx

Guest
I tried to validate my page with XHTML 1.1. However I got this error message that I can't figure out.<br />
<br />
The "input" tag has an "id" attribute but it must be used to explicitly associate this control with a "label" element using the "label" element's "for" attribute (for="text"). When electronic forms are designed to be completed online, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues [Section 1194.22 (n)]. Information attached to controls via the "label" element can be very useful to users of talking browsers. Note that "id" and "for" values are case sensitive. Visit <!-- m --><a class="postlink" href="http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels">http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels</a><!-- m --> for more information <br />
<br />
The offending line is:<br />
<input id="radio1" for="radio" name="sitesearch" value="" /> Search WWW <br />
<br />
Please advise<!--content-->The id goes in the input and the for goes in the label.<!--content-->As ray says:<label for="radio1">A description.</label><br />
<input id="radio1" name="sitesearch" type="text" value="" />A more full example of this is here (<!-- m --><a class="postlink" href="http://fsg-uk.com/rjsystems/help.php">http://fsg-uk.com/rjsystems/help.php</a><!-- m -->).<!--content-->Thanks for the tip, I have an additional query, from your link u game me, Lavalamp; isn't the tabindex also to be mentioned in the FORM tag?<!--content-->The tabindex is used to specify the order through which a user can tab through links and form elements. You are supposed to use it to provide a logical tab order through the links and form elements.<br />
You don't need to use it if the elements on your page already have a logical tab order.<br />
<br />
If you want to use more semantic markup, group your form elements into different categories using the <fieldset> tag and use a <legend> tag to provide a title for each <fieldset>.<!--content-->
 
Back
Top