W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2014

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

From: Florian Rivoal <florian@rivoal.net>
Date: Mon, 10 Nov 2014 15:23:10 +0100
Message-Id: <F52AE98B-7C2C-4221-B48E-8BED4620DDA8@rivoal.net>
To: whatwg@whatwg.org
: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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:32 UTC