W3C home > Mailing lists > Public > www-style@w3.org > February 2011

HTML, following implementations, treats active state and :active-matching as different things

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 14 Feb 2011 18:34:23 -0800
Message-ID: <4D59E62F.9080304@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
Forwarding a message from Ian Hickson (HTML spec editor).

See http://dev.w3.org/html5/spec/Overview.html#selector-active

Ian Hickson wrote:
> On Mon, 14 Feb 2011, Tab Atkins Jr. wrote:
>> No, I said it was okay for the host language to define *how* things are
>> activated.  That's obvious, because CSS can't possibly define activation
>> behavior at the appropriate level of detail - that's something the
>> platform needs to do (it might be driven through mouse events, touch
>> events, etc.).
>> It's not okay to leave it undefined *which* elements can be activated,
>> because there are applications on the web that depend on arbitrary
>> elements being able to receive :active.  Thus we should state that, so
>> new browsers don't have to do reverse-engineering to figure out which
>> elements should be :active'able.
>> We should also define that the ancestors of an :active element are
>> :active, for the same reason.
> A simpler way to put it is that it's the host language's job to define
> what can be activated, but that in practice :active is not limited to
> elements that can be activated. We should just update Selectors to match
> reality and just say that it "must match:
>  * any activatable element between the time the user begins to activate
>    the element and the time the user stops activating the element, as
>    defined by the element's definition, and
>  * any element that the user indicates using a pointing device while that
>    pointing device is in the "down" state (e.g. for a mouse, between the
>    time the mouse button is pressed and the time it is depressed), and
>  * any element that has a descendant that matches :active."
> Then I could update the HTML spec to not contradict the CSS spec. (Right
> not it has to contradict it because CSS says that only activatable
> elements can be :active, but a <div> with no tabindex="" attribute in HTML
> can't be activated -- it has no activation behaviour -- but it can still
> match :active if it is clicked or if its descendants are clicked.)
> While we're at it we should define that :hover "must match:
>  * any element that the user indicates using a pointing device, and
>  * any element that has a descendant that matches :hover."
> ...or some such (currently we're not saying the second bit, leaving that
> undefined for some reason).
Received on Tuesday, 15 February 2011 02:34:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC