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

Re: Problem with labeling radio buttons

From: Liam Quinn <liam@htmlhelp.com>
Date: Thu, 18 Jun 1998 13:07:42 -0400
Message-Id: <3.0.5.32.19980618130742.00a7d8c0@undergrad.math.uwaterloo.ca>
To: jkrieger@cast.org, w3c-wai-gl@w3.org
At 11:55 AM 18/06/98 -0400, Josh Krieger wrote:
>I was looking into making Bobby correctly sense LABELS for
>radio buttons and I come up with the problem that the text
>which the radio button corresponds to is not the same text
>that modifies the set of radio button options. In other
>words, the radio button set is different than just a textfield,
>or textarea. I suggest an alternative strategy where a LABEL 
>additionally applies to a FIELDSET. i.e.,
>
><FORM ACTION="foo" METHOD="get">
><LABEL for="famdogs">Famous dogs: </LABEL>
><FIELDSET id="famdogs">
><INPUT type="radio" name="dogs" value="male" id="benji" CHECKED>
><LABEL for="benji">Benji</LABEL><BR>
><INPUT type="radio" name="dogs" value="male" id="lassie">
><LABEL for="lassie">Lassie</LABEL>
></FIELDSET>
><INPUT type="submit" name="submit">
></FORM>

I believe the following is what you want:

<FORM ACTION="foo" METHOD="get">
<FIELDSET>
<LEGEND>Famous dogs:</LEGEND>
<INPUT type="radio" name="dogs" value="male" id="benji" CHECKED>
<LABEL for="benji">Benji</LABEL><BR>
<INPUT type="radio" name="dogs" value="male" id="lassie">
<LABEL for="lassie">Lassie</LABEL>
</FIELDSET>
<INPUT type="submit" name="submit">
</FORM>

-- 
Liam Quinn
Received on Thursday, 18 June 1998 13:07:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:46:57 GMT