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

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

Reinier Kaper <rp.kaper@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rp.kaper@gmail.com

--- Comment #16 from Reinier Kaper <rp.kaper@gmail.com> ---
(In reply to comment #14)
> (In reply to comment #12)
> > <label id="label1" for="f3">label text </label> 
> > <input type="text" id="f3" aria-labelledby="label1 label2 label3"> 
> > <p>other content</p> 
> > <label id="label2">more label text</label>
> > <p>other content</p> 
> > <label id="label3">even more label text</label>
> 
> So that example would not be valid if we were to change the spec to say a
> <label> element must have either a "for" attribute or a "labelable elementa"
> as a descendant.
> 
> I recognize that the "aria-labelledby" attribute on the <input> element in
> the example achieves a similar purpose, but I'm personally reluctant to
> start making any core document-conformance rules change depending on
> particular ARIA attributes, and I think it'd not unreasonable to consider it
> a layering violation.

I have to agree with making the first statement.

If you disregard ARIA for a second and look at the purpose of each of the
labels, then the author's intention would be to 'link' the labels to another
element, right?

This implies an association between each of the labels and its 'target'. I
think a "for" attribute should be required in such a case, even if there's an
ARIA role that already links them.

As a side-note: I think label wrapping is fairly common when checkboxes and
radio buttons are involved. I've seen the pattern before and use it myself as
well in most cases, as it's a nice way to render the label inline with a
control.

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

Received on Wednesday, 17 July 2013 15:52:23 UTC