WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: WCAG and form labels

for

From: Jared Smith
Date: Aug 21, 2006 12:00PM


Andrew Kirkpatrick wrote:
> Jared,
> Your example below is explicitly labeled. I've always thought that if
> you wrap a label around a control that it sould count as explicit, but
> it doesn't unless the for/id are used. When they are used you have
> explicit labeling.

But does this mean that implicit and explicit labeling are mutually
exclusive? If they are not, and you use for/id and also wrap the label
element around the form control, is this ALSO implicit. If it is, then
according to the documentation, it is deprecated and shouldn't be used.
The WCAG 1.0 documentation uses this approach and clearly calls it
implicit - http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels

Based upon this and upon the WCAG 2.0 examples, I have to assume that
wrapping the label around the form control is deprecated, regardless of
whether explicit labeling is used.

> If WCAG 2.0 disallows this I'd be very surprised and
> would lobby against this, since it works and also has benefits for
> styling forms (applying css rules to the label element such as label
> {display:block;} )

And this begs the question of whether the form control is (or should be)
part of the label for itself. I believe this is the motivation for the
deprecation of implicit labels. Semantically, it just doesn't make sense
that the form element be part of the label for itself. On the other hand,
it's a widely used practice and one that was recommended in WCAG 1.0.

This is really why I'm wondering if others are as confused as I am about
it. If so, then we need to ask the WCAG 2.0 group for some clarification.

Jared Smith
WebAIM.org