Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#530@minor: Broader support for HTMLLabelElement control. #987

Merged
merged 2 commits into from Aug 2, 2023
Merged

#530@minor: Broader support for HTMLLabelElement control. #987

merged 2 commits into from Aug 2, 2023

Conversation

joshkel
Copy link
Contributor

@joshkel joshkel commented Jul 13, 2023

This supports nested / descendent input elements for HTMLLabelElement's control property and also supports other labelable elements, as described in the spec:

https://html.spec.whatwg.org/multipage/forms.html#category-label

To be fully spec-compliant, the control getter would ignore for element(s) that aren't labelable elements, and labelable elements would also include form-associated custom elements.

I'm using a CSS selector for this, because that seemed like the most convenient approach, but if another approach would be better (e.g., for performance?), please let me know.

Fixes #530.

This supports nested / descendent input elements for HTMLLabelElement's `control` property and also supports other labelable elements, as described in the spec:

https://html.spec.whatwg.org/multipage/forms.html#category-label

To be fully spec-compliant, the `control` getter would ignore `for` element(s) that aren't labelable elements, and labelable elements would also include form-associated custom elements.

I'm using a CSS selector for this, because that seemed like the most convenient approach, but if another approach would be better (e.g., for performance?), please let me know.

Fixes #530.
Copy link
Owner

@capricorn86 capricorn86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @joshkel! 🌟

@capricorn86 capricorn86 merged commit 5acbab1 into capricorn86:master Aug 2, 2023
1 check passed
@joshkel joshkel deleted the task/530-label-controls branch August 2, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

span-wrapped checkboxes are not selectable (ant design)
2 participants