W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2004

RE: Fieldset legend text doesn't wrap

From: Terry Thompson <tft@u.washington.edu>
Date: Sun, 23 May 2004 22:58:29 -0700
To: <w3c-wai-ig@w3.org>
Message-ID: <000001c44154$24921bf0$ed9fdccf@MH350Athompst3>

I've encountered this problem too. If Jason's example is an "abuse of
legend", what exactly is the correct technique? 

Take this overly simple example...

<legend>What is your favorite season?</legend>
<input type=radio name='season' id='winter'>
  <label for='winter'>Winter</label>
<input type=radio name='season' id='spring'>
  <label for='spring'>Spring</label>
<input type=radio name='season' id='summer'>
  <label for='summer'>Summer</label>
<input type=radio name='season' id='fall'>
  <label for='fall'>Fall</label>

The problem: With each radio button in this fieldset, screen readers
should announce two pieces of information: (1) the overall question
("What's your favorite season?") and (2) the label that identifies the
current radio button (e.g., "Spring"). 

The solution? Since each LABEL element is associated with exactly one
form control (not two), how else other than LEGEND can we explicitly
ensure that screen readers have access to the overall question? Jaws
currently supports this LEGEND & LABEL combination (maybe other screen
readers too - I'm not sure), and I see nothing in the html4 spec that
defines LEGEND as being of a restricted length.  

By the way, this isn't just an IE bug - Netscape does it too. Opera does
not (it wraps the legend). In IE and Netscape, I can force a line break
in a legend using BR elements, but surely there must be some CSS
solution that's less arbitrary? 


>-----Original Message-----
>From: w3c-wai-ig-request@w3.org 
>[mailto:w3c-wai-ig-request@w3.org] On Behalf Of David Woolley
>Sent: Friday, May 14, 2004 2:36 PM
>To: w3c-wai-ig@w3.org
>Subject: Re: Fieldset legend text doesn't wrap
>> I used a survey tool called Perseus for a project a while ago and it
>** is meant to generate section 508 compliant forms for the 
>questions and
>** uses the fieldset and legend tags for the questions and answers.
>That's an abuse of legend.  Legend is for grouping form 
>controls.  It is basically a platform native user interface 
>component (which is one reason why it has limited capability 
>in IE).  In its original use, the intention was to have just 
>one or two words.
>> The problem is that my client has found that when you increase the 
>> text size a> nd view on a low resolution (like 800x600), some 
>> questions don't wrap and th e text trails off to nowhere.
>Same for your very long lines!  text/plain email is not 
>intended to be word wrapped, there are specific MIME formats for that.
Received on Monday, 24 May 2004 02:00:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:28 UTC