You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The labels attribute (for HTMLInputElement, HTMLSelectElement, etc.) is supposed to include enclosing labels, but it incorrectly only includes enclosing labels if the labelable element has an ID.
To Reproduce
<label>
This is a checkbox
<input type="checkbox" data-test-d="foo">
</label>
document.querySelector("[data-test-id='foo']").labels is empty.
Expected behavior
document.querySelector("[data-test-id='foo']").labels contains one label.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
labels
attribute (for HTMLInputElement, HTMLSelectElement, etc.) is supposed to include enclosing labels, but it incorrectly only includes enclosing labels if the labelable element has an ID.To Reproduce
document.querySelector("[data-test-id='foo']").labels
is empty.Expected behavior
document.querySelector("[data-test-id='foo']").labels
contains one label.The text was updated successfully, but these errors were encountered: