WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Label for a set of radio buttons

for

From: Tony Olivero
Date: Jun 10, 2013 3:25PM


I think it's going to depend on the user. A speech/Braille output user
tabbing through a form won't necessarily link the question if it's not
symantically tied to the radio button group. If you want to make your
heading/paragraph keyboard focusable, that's one option too, but adds
a tab stop for keyboard users that might not be necessary.

I disagree with the assertion that the question can be disembodied
from the answer choices.

Tony

On 6/10/13, Dave Merrill < <EMAIL REMOVED> > wrote:
> "You could put the question in the legend, or make it a heading
> element, or just a paragraph (p element). But this has no crucial
> impact, and it has nothing to do with labelling things."
>
> Hmmm, don't know that I buy that. A disembodied radio with a clearly
> labeled value means nothing without the question it's an answer to. If AT
> users are supposed to link them based on context, fine, just trying to
> confirm that that's the state of the art.
>
>
> On Mon, Jun 10, 2013 at 5:08 PM, Jukka K. Korpela
> < <EMAIL REMOVED> >wrote:
>
>> 2013-06-10 23:57, Dave Merrill wrote:
>>
>> > From an accessibility point of view, how are you supposed
>> > to label a set of radio buttons?
>>
>> You aren't.
>>
>> > The 'for' attribute of a <label> tag has
>> > to point to a single control (not a fieldset),
>>
>> Exactly.
>>
>> > and label tags can surround
>> > only one field (not to mention the fact that the label isn't always
>> > adjacent to the actual field).
>>
>> A label element can be associated with a single control (input field).
>>
>> > One answer is a separate label for each radio, which in some sense you
>> need
>> > anyway to explain it,
>>
>> Yes, and that's what the label element is for.
>>
>> > but how then do you tie them together, and to the
>> > question being asked?
>>
>> Any way you like, or no way. Normally, when there is a question followed
>> by alternative answers, the situation is pretty clear. You can wrap the
>> radio buttons inside a fieldset element, and use the legend element for
>> it. You could put the question in the legend, or make it a heading
>> element, or just a paragraph (p element). But this has no crucial
>> impact, and it has nothing to do with labelling things.
>>
>> Yucca
>>
>> >> >> >>
>
>
>
> --
> Dave Merrill
> > > >