caniuse icon indicating copy to clipboard operation
caniuse copied to clipboard

Add support for control.labels

Open lanzkron opened this issue 11 years ago • 3 comments

http://www.w3.org/TR/html5/forms.html#the-label-element Has the following :

Labelable elements have a NodeList object associated with them that represents the list of label elements, in tree order, whose labeled control is the element in question. The labels IDL attribute of labelable elements, on getting, must return that NodeList object.

In other words for the following HTML:

  <label for="someId">A label</label> <input id="someId"/>

The following code should output evaluate as true.

 document.getElementById('someId').labels.length == 1

lanzkron avatar Jul 16 '15 13:07 lanzkron

MDN has some information on that, but not much either.

xi avatar Mar 12 '17 18:03 xi

https://developer.mozilla.org/en-US/Firefox/Releases/56:

Implemented labels property for labelable form controls

Schweinepriester avatar Jul 24 '17 13:07 Schweinepriester

Now available at https://caniuse.com/#feat=mdn-api_htmlinputelement_labels

Fyrd avatar Sep 23 '19 04:09 Fyrd