[selectors] define how the :active state propagates across elements


The selector spec does not define whether the :active pseudo class applies to more than the element which is directly activated.


I’ve tested a bit, and here are the current behaviours:

a - Firefox, chrome, safari and IE(11) propagate the :active state from a label to its labelled control (linked through the ‘for’ attribute)

b - IE(11) also propagates the active state from a labelled control to its label (opposite direction from a)

c- Firefox, chrome, safari, *but not IE(11)* propagate the :active state to parent of an :active element

(If anyone cares, Opera's Presto does neither a, b nor c)

Proposal 1: Similarly to :hover, add “Host languages may define additional ways in which an element can match :active.” and let the whatwg sort out a vs a+b in the html spec

Proposal 2: If IE is willing to adjust, define that just like :hover “The parent of an element that is :active is also in that state.” (and ping the whatwg to reflect that in their spec as well)

 - Florian

Received on Thursday, 6 November 2014 13:24:49 UTC