Re: [csswg-drafts] [css-selectors] Make <label> elements reflect CSS pseudoclasses on associated form element (#397)

I am strongly opposed to let labels directly reflect the pseudo-classes of the associated form control.

1. The state of the form control doesn't apply to the label. E.g. it's the form control that is focused, not the label.
2. Letting pseudo-classes behave differently depending on whether they are prepended by `label` or not is confusing.
3. Letting the pseudo-classes apply to labels now may break existing websites.

Therefore, solving this use case via a pseudo-class function like `:for()` as discussed in #1067 is much more logical, in my eyes. Furthermore a function like that has the advantage of being extensible and covering more than just form control states.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/397#issuecomment-736831335 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 1 December 2020 21:27:57 UTC