This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11422 - A LABEL can be associated with EXACTLY ONE form element
Summary: A LABEL can be associated with EXACTLY ONE form element
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: Documentation (show other bugs)
Version: HEAD
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2010-11-28 18:15 UTC by Richard Lynch
Modified: 2010-11-28 18:15 UTC (History)
0 users

See Also:


Description Richard Lynch 2010-11-28 18:15:22 UTC
As describe in #1199, marked invalid for some reason, two INPUT within a single LABEL validates, despite this:

Not only that, a LABEL with *no* FOR attribute and *no* enclosed form element will also validate.

So you might as well remove the line "Each LABEL element is associated with exactly one form control." because it's *not* being enforced in any way, shape, or form.

And I've just inherited a project where the "designer" is using LABEL for layout (with inline style attributes, no less) with zero form elements for the LABELs.  I.e., he should have used SPAN or DIV, but didn't.

If you mean "exactly one" then enforce it.  If you don't mean it, then don't say it.  You've got designers running around claiming their HTML validates, which it does with your DTD, but the DTD doesn't encompass this at all, so it's not up to spec... [shrug]

Maybe I'm just being too critical, but either the Docs or the DTD should change to agree with each other.