WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Radio Buttons Again!


From: Jukka K. Korpela
Date: Oct 20, 2003 8:47AM

On Mon, 20 Oct 2003 <EMAIL REMOVED> wrote:

> Are you suggesting that you can nest a <label> within a <label>?

No. Sorry for my poor wording.

> This makes
> logical sense but I would not have thought that the standards allowed it.

It is questionable whether it would make sense to nest <label> elements.
And in any case, HTML syntax has an explicit prohibition against nesting
<label> elements (though this syntactic restriction in not enforceable in

> > Label for the group
> > ( ) label for button
> > ( ) label for button
> > ...

What I meant by "Label for the group" is a heading-like construct.
It would most naturally be a <legend> when <fieldset> is used,
as others have suggested, but I don't think it's that important for
practical accessibility which markup you use. In fact, suitable heading
markup (e.g. <h2> element) would have several benefits. I see no reason
why it could not alternatively be a <th> element, if the form as a whole
is marked up as a table.

If you use <fieldset> and <legend>, it implies a certain default
rendering, and although you can style it a bit, the possibilities are
rather limited. In theory, by WAI guidelines you should use <fieldset>,
and <legend> is an obligatory element then, so if you take the rules
strictly you have little choice here. But as I wrote, I think the division
into rows is most important in practice.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/