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]
*******************************************************************

Reply via email to