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

Re: Selectors Tests

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 7 Nov 2008 15:29:21 -0600
Message-ID: <dd0fbad0811071329t67b9230bye7cc1205e5424861@mail.gmail.com>
To: "Zack Weinberg" <zweinberg@mozilla.com>
Cc: www-style@w3.org
On Fri, Nov 7, 2008 at 3:21 PM, Zack Weinberg <zweinberg@mozilla.com> wrote:

> Andrew Fedoniouk <news@terrainformatica.com> wrote:
> > Boris Zbarsky wrote:
> > > ... the old text said:
> > > # An element is enabled if the user can either activate it or
> > > # transfer the focus to it. An element is disabled if it could be
> > > # enabled, but the user cannot presently activate it or transfer
> > > # focus to it.
> > >
> > > Which sounds pretty exclusive to me.
> >
> > This phrase tells me that :enabled and :disabled "can be true at the
> > same time. Otherwise my parser is failed on "element is disabled if
> > it could be enabled". The light bulb is off if it could be on, eh?
> I think the thing youre missing is, there exist elements that the user
> can *never* "either activate or transfer the focus to", no matter what
> the document state is.  For those elements, neither :enabled nor
> :disabled matches.
> For all elements that *can* be :enabled, exactly one of :enabled
> and :disabled matches at any given time, depending on the document
> state.
> To me, that reading is clear from the text quoted, if you pay close
> attention to every word, and assume that the definition of :disabled is
> not supposed to be tautological.  fantasai's revision makes it clearer.

Nod to Zack.  That's the intended reading.

I would note as well that, since we're punting the issue of determining what
elements/states can match :enabled/:disabled, then using :input rather than
:enabled is *not* what we want. The language may define all and only its
input elements as enable-able, but it may not.  Better to keep the language
a touch more abstract so that we don't run into issues later.

Received on Friday, 7 November 2008 21:30:43 UTC

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