[whatwg] relationship between labeled control and label for :active and :hover pseudos

:hover matches on the labeled control of a label element currently matching :hover.

Similarly, :active interoperably matches on the labeled control of a label element currently matching :active (and https://www.w3.org/Bugs/Public/show_bug.cgi?id=27247 is about reflecting that in the spec)

In addition, IE (tested IE10 and IE11) makes it work the other direction, making :hover (resp. :active) match on the label of a labeled control currently matching :hover (resp. :active).

Given that this behaviour sounds reasonable, that authors occasionally ask for by the ability to style the label based on the state of the labeled control, that this cannot be expressed by css selectors otherwise, and taking IE’s behaviour as evidence of a lack of widespread compat issues, I suggest making this propagation of the :hover and :active state between label and labeled control bidirectional for both :hover and :active.

 - Florian

Received on Monday, 10 November 2014 14:23:39 UTC