W3C home > Mailing lists > Public > www-style@w3.org > November 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 13 Nov 2014 14:54:53 -0800
Message-ID: <CAAWBYDB-PpZp_2EQOmg-jR-u94bGMXEcBd6EMNvbXer=UfKiiw@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style list <www-style@w3.org>
On Thu, Nov 6, 2014 at 5:24 AM, Florian Rivoal <florian@rivoal.net> wrote:
> Hi,
> The selector spec does not define whether the :active pseudo class applies to more than the element which is directly activated.
> http://dev.w3.org/csswg/selectors/#the-active-pseudo
> 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)

Given that HTML defines :active to propagate to ancestors, I've gone
ahead and specced that.

I also added the "host languages can define more ways to match :active" line.

Glad to see the bug in HTML now for handling :active and <label>.
I'll point to the text, similar to how :hover does, when it exists.

Received on Thursday, 13 November 2014 22:55:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:48 UTC