Sorry, I meant to say, when the label teg encloses the label text AND the input.
However, on checking W3C acessibility guidelines, it appears I may be wrong about this. (http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels ) But, in the W3C recomendations for form labels it gives implicit/explicit labels as two distinct methods (one not using the "for"). (http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.9.1 ) Interesting... On Fri, May 25, 2007 3:40 pm, Stuart Foulstone wrote: > Hi, > > The "for" attribute should NOT be used when the label tag encloses the > label text. > > > On Fri, May 25, 2007 2:45 pm, Mike at Green-Beast.com wrote: >> Good morning :-) >> >> I should have expanded my example a little more since I do use the "for" >> attribute in labels, even when directly (implicitly?) associated: >> >> <form> >> <fieldset> >> <legend>Send us your contact info</legend> >> <p>Fields marked with * (asterisk) are required.</p> >> <label for="name"><span>*</span> Name: <?php echo error(); ?> >> <input type="text" id="name" name="name" value="" /> >> </label> >> <label for="email"><span>*</span> Email: <?php echo error(); ?> >> <input type="text" id="email" name="email" value="" /> >> </label> >> <label for="url">Web site: >> <input type="text" id="url" name="url" value="" /> >> </label> >> </fieldset> >> </form> >> >> (Note: The labels/names were chosen to best accommodate autofill users.) >> >> Karl Lurman wrote: >>> About putting the error in the label, not >>> sure on that one either. Is >>> an error a label after all... >> >> Me neither actually, just not sure. In a way I think it's smart for >> accessibility in that it changes that label (changes what it says and >> what >> it means), and for locating the offense I think it's smart. On my form >> the >> errors are on a different screen with a #results bookmark so when >> submitted >> the user is brought directly to the result of their action (same for the >> success confirmation message), but getting back can be problematic. >> Either >> way, for screen reader users it can't be easy to know: >> >> 1) The results of their action. >> 2) How/where to fix the result if needed if unsuccessful. >> >>> Man, I hope for us all that the new HTML and >>> XHTML standards cover form semantics better... >> >> Hehe, that might be a good thing. Take out some of the gray areas. It'll >> have to be pretty complete though since most of the gray areas are >> content-related and there are so many unique situations :-) >> >> Cheers and happy Friday! >> Mike Cherim >> >> >> >> >> >> >> >> ******************************************************************* >> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm >> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm >> Help: [EMAIL PROTECTED] >> ******************************************************************* >> >> > > > -- > Stuart Foulstone. > http://www.bigeasyweb.co.uk > BigEasy Web Design > 69 Flockton Court > Rockingham Street > Sheffield > S1 4EB > > Tel. 07751 413451 > > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: [EMAIL PROTECTED] > ******************************************************************* > > -- Stuart Foulstone. http://www.bigeasyweb.co.uk BigEasy Web Design 69 Flockton Court Rockingham Street Sheffield S1 4EB Tel. 07751 413451 ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************
