WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Legend wrap (or not)

for

From: Keith Parks
Date: Aug 29, 2007 9:00AM


On Aug 29, 2007, at 4:49 AM, Jukka K. Korpela wrote:

> Not necessarily. Labels should be short, too. A label/field pair
> can be
> preceded by explanatory text if needed. E.g.:
>
> <fieldset>
> <legend>Watching TV</legend>
> How much do you watch television? Please estimate this as an average
> number of hours per day, during the last six months.
> <div><label for="tv-hr">Hours per day:</label>
> <input id="tv-hr" type="text" size="2" maxlength="2"></div>
> </fieldset>
>
> This would mean repeating the text "hours per day", which is _good_
> here
> in my opinion, since it's essential information. But if desired,
> the label
> text _could_ be just "Hours:".

Is there any reason not to wrap the <label> around text that is
already there?

From your example:

<fieldset>
<legend>Watching TV</legend>
How much do you watch television? Please estimate this as an average
number of <label for="tv-hr">hours per day</label>, during the last
six months.
<input id="tv-hr" type="text" size="2" maxlength="2">
</fieldset>


******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444
(619) 594-1046
mailto: <EMAIL REMOVED>
http://www.sa.sdsu.edu/communications

http://kparks.deviantart.com/gallery
----------------------------------------------------------

World Peace through Cascading Style Sheets.