WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Legend wrap (or not)

for

From: Patrick Lauke
Date: Aug 29, 2007 4:50AM


> Jukka K. Korpela

> <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.
>
> In addition to solving the wrapping problem, this has
> basically the same
> benefits as the use of short descriptive headings.

But how do you tie the text - which gives important information on how to answer the question - to the form controls that follow? Assuming that you're intending this to be a series of radio buttons, you seem to suggest (simplifying the markup)

<fieldset>
<legend>Watching TV</legend>
<p>How much do you watch television? Please estimate this as an average number of hours per day, during the last six months.</p>
<input type="radio" name="..." id="..." value="1" />
<label for="...">1 hour</label>
...
<input type="radio" name="..." id="..." value="72" />
<label for="...">72 hours</label>
</fielset>

Now, in forms mode or similar, a screen reader user may just hear "Watching TV - 1 hour" or something to that effect...

(although, in this particular example, I would actually go for a text input, which would make the whole "How much..." probably a label, with no need for a fieldset/legend)

P