<p>Fields marked with * (asterisk) are required.</p>
Yep, instructions are definitely the way to go with the 'required'. we might even look at making instructions for the required as a definition list (hahaha just for fun) <form....> <dl> <dt>*</dt> <dd>Fields whose labels contain an asterisk require a value.</dd> </dl> Hey, I mean it kind of makes sense - I have defined what a '*' means in the context of the form... :) Seriously though, we could look at adding more text instructions and aids to help non-visual browsers with the error messages e.g: <label>Field Label.... <a name="fieldAnchor"></a><input ....> <span class="error"> <span class="forScreenReaders"> <em>An Error Has Occurred For Field <?php =$fieldLabel?>:</em><br /> </span><?php echo $error?> <span class="forScreenReaders"> <br /><a href="#<?php =$fieldAnchor?>" title="Fix the error">Take me to the field so I can fix the error</a> </span> </span><!-- Close of error --> And style accordingly, where forScreenReaders 'hides' elements off left of screen. Not sure if a link to a named anchor before/after/around the field is enough - it would be nice to focus the screen reader onto the input field itself, perhaps a piece of javascript in the onclick would work with SOME screen readers here.
<label><span>*</span> Name: <?php echo $error; ?> <input value="" /> </label>
Im not the biggest fan of a label 'around' an input. To me, it doesn't make a lot of sense, but I know that its standard practice with a lot of people. I understand that it gives us another means of encapsulating our label/field pair, but again I am unsure on the semantics - it poses the question, what is the purpose of the attribute "for" in labels?
- Note: Error would be empty if not applicable. And the script outputted error would be in an unclassed span like the asterisk.
About putting the error in the label, not sure on that one either. Is an error a label after all... Overall though, I think if we are trying to cut down on the use of superfluous containers, your method is as good as any other :) Man, I hope for us all that the new HTML and XHTML standards cover form semantics better... Karl ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************