W3C home > Mailing lists > Public > www-style@w3.org > August 2004

Re: [css3-selectors] May ':active' be applied to "normal" elements or not?

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Thu, 19 Aug 2004 02:24:53 +1000
Message-ID: <412382D5.3020102@iinet.net.au>
To: Anne van Kesteren <fora@annevankesteren.nl>
CC: tonico@hotpop.com, W3C CSS List <www-style@w3.org>

Anne van Kesteren wrote:
>>> I believe that most browsers have ':active' implemented in a way that 
>>> it can be applied to every element, as in:
>>> ...
>>> In Bugzilla a bug was reported about a CSS3 test case, which 
>>> indicates that ':active' is probably only meant for form and 
>>> hyperlink elements, as in INPUT, A, LINK, AREA, BUTTON and probably 
>>> more.

I just had this discussion with Hixie in a private discussion regarding 
a CSS2.1 test case he had developed, which I extended and modified 
slightly [1].  I initially thought that :active should apply to any 
element, as it currently does in Mozilla and Opera.  However, as he 
pointed out, it does not make sense that something like a paragraph can 
be activated, since nothing happens.  It's not like a link or a button 
which are designed to have some functionality when activated.  Hixie 
told me he filed a bug he filed a bug with Opera, and I filed bug 255713 
[2] with Mozilla, which turned out to be a duplicate of 243459 [3].

> There is. But I just read this is basically up to the UA[1]:

I disagree.  Where in any spec does it say that this behaviour is up to 
the UA?

> # I'm pretty sure the WG explicitly decided that this is up to the UA,
> # and there are significant advantages to doing it this way -- it gives
> # authors more flexibility and power, it's easier to implement, and the
> # implementation doesn't need to be constantly revised.

If this is true, than the spec should be updated to reflect that, and 
then Mozilla and Opera's implementation would be correct, however as it 
curently stands, that is not how I understand it.

> I think CSS3 Selectors should be updated to reflect that or the WG 
> should provide a more detailed description of what the UA should do. 
> That description should most likely address the concerns addressed in 
> comment 8 in that (invalid) bug report[2].

As mentioned in bug 243459, event handlers can still apply to any 
element, and in such cases where an event such as onclick has been 
applied to an element, I think it would be reasonable to expect that 
:active would also apply since something will, presumably, actually 
happen when it is activated.  But, when there's no event handler, or 
default behaviour I don't think it makes any sense for :active to apply. 
  In any case, as it stands, I don't think the bug should be labeled 
invalid, at least until the exact behaviour is clarified in the specs.

[1] http://www.lachy.id.au/dev/css/tests/css21/5-selectors/
     (see the pseudo-class-active-* files in that directory)
[2] http://bugzilla.mozilla.org/show_bug.cgi?id=255713
[3] http://bugzilla.mozilla.org/show_bug.cgi?id=243459

Lachlan Hunt

Received on Wednesday, 18 August 2004 16:25:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:15 UTC