Re: Selectors Tests

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.

zw

Received on Friday, 7 November 2008 21:22:41 UTC