[Bug 22586] label element that does not label a control is currently conforming

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22586

--- Comment #13 from Michael[tm] Smith <mike@w3.org> ---
(In reply to comment #3)
> I agree that a label which does not label a control (either by wrapping or
> explicit association) should be an error.
> 
> Use of the element would imply its purpose is to label something - that is
> we can infer some author intent - so if it does not in fact do so I think
> it's fair to say it's an author error. 
> 
> To think of it another way, if that slipped through in my code I'd want to
> get an error :)

I agree with Ben here. I think if somebody has a document that has a <label>
element without either a "for" attribute or any "labelable elements" as
descendants, there's a high probability that it's not intentional but instead
is an authoring oversight/mistake that they'd like to be alerted about. So I
think it would be useful for the validator to emit a message here, even if it's
just a warning.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 7 July 2013 02:44:10 UTC