[Webkit-unassigned] [Bug 195836] <label> with nested <input>s always focuses the first input when clicking other inputs
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 6 05:30:58 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=195836
Curtis Wilcox <webkit.org at m.cognize.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |webkit.org at m.cognize.org
--- Comment #2 from Curtis Wilcox <webkit.org at m.cognize.org> ---
Multiple inputs as children of a single label element is not valid HTML. Run the test case through https://validator.w3.org/nu/ and one of the errors will be "The label element may contain at most one button, input, meter, output, progress, select, or textarea descendant."
The WHATWG spec document doesn't describe only one such child element as valid, it says "If the for attribute is not specified, but the label element has a labelable element descendant, then the first such descendant in tree order is the label element's labeled control." That matches the behavior you describe.
https://html.spec.whatwg.org/multipage/forms.html#the-label-element
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200406/5c069364/attachment.htm>
More information about the webkit-unassigned
mailing list