Add support for control.labels #1733

Open
lanzkron opened this Issue Jul 16, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@lanzkron

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
@xi

This comment has been minimized.

Show comment
Hide comment
@xi

xi Mar 12, 2017

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

xi commented Mar 12, 2017

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

@Schweinepriester

This comment has been minimized.

Show comment
Hide comment
@Schweinepriester

Schweinepriester Jul 24, 2017

Contributor

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

Implemented labels property for labelable form controls

Contributor

Schweinepriester commented Jul 24, 2017

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

Implemented labels property for labelable form controls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment