Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement and ship: spec changes to the .form property and "form" attribute on <label> elements

45 views
Skip to first unread message

Boris Zbarsky

unread,
May 23, 2016, 3:17:11 PM5/23/16
to
Summary: The "form" content attribute on <label> elements no longer
means anything. .form returns the .form of the labeled control, or null
if nothing is labeled or the labeled thing has no .form. In particular,
you can no longer associate a label with one form but associate its
labeled control with a different form.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1268852

Spec: https://github.com/whatwg/html/pull/1120 and
https://html.spec.whatwg.org/multipage/forms.html#the-label-element and
https://html.spec.whatwg.org/multipage/forms.html#dom-label-form

Estimated release: 49

devtools bug: none needed, I think.

Support in other browsers: Chrome is planning to do this. See
<https://groups.google.com/a/chromium.org/d/msg/blink-dev/QWyCpJjgfY8/TOxG9n-OAQAJ>.
According to that message, Edge and WebKit don't support the "form"
content attribute on <label> anyway; .form always returns the ancestor
form in those engines.

-Boris

smaug

unread,
May 23, 2016, 4:53:57 PM5/23/16
to Boris Zbarsky
As I said in https://github.com/whatwg/html/issues/787 this change looks ok to me.


-Olli

Florin Mezei

unread,
May 24, 2016, 7:17:07 AM5/24/16
to dev-pl...@lists.mozilla.org
Is there any chance for this to break web compatibility? Sounds like it
shouldn't.

Regards,
Florin.
_______________________________________________
dev-platform mailing list
dev-pl...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Boris Zbarsky

unread,
May 24, 2016, 3:10:55 PM5/24/16
to
On 5/24/16 7:16 AM, Florin Mezei wrote:
> Is there any chance for this to break web compatibility?

Yes, there is, but seems pretty low. The Chrome intent to implement at
https://groups.google.com/a/chromium.org/d/msg/blink-dev/QWyCpJjgfY8/TOxG9n-OAQAJ
has some data. Quoting:

--------------------------------------
`form' content attribute of LABEL element is used in less than 0.0023%
of page views.
https://www.chromestatus.com/metrics/feature/timeline/popularity/986

label.form is different from label.control.form in less than 0.0016% of
page views.
https://www.chromestatus.com/metrics/feature/timeline/popularity/1261
---------------------------------------

-Boris
0 new messages