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

Re: Selectors Tests

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 05 Nov 2008 16:20:10 -0800
Message-ID: <4912383A.5080408@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, www-style <www-style@w3.org>

Boris Zbarsky wrote:
> fantasai wrote:
>> Well, the Selectors spec is fixable. Daniel and I are actively
>> editing it now. However I don't think I agree that :enabled/:disabled
>> should not apply to type="hidden". The distinction does exist for
>> hidden controls as well, does it not?
> Indeed.  Disabled hidden inputs do not submit.
> If that's the sort of distinction we want for :enabled/:disabled, that's 
> also fine by me; the spec text just needs to be adjusted to handle that, 
> then.

Goals for rewording:
   - Allow HTML5 to easily define what elements are :enabled or :disabled
   - Make sure definition of :enabled/:disabled depends not on CSS but on
     the semantics of the markup and object model.
   - Make sure <input style="display: none"> matches :enabled
   - Make sure <a href=""> does not match :enabled

Here's a proposal:

  # The :enabled pseudo-class allows authors to customize the look of
  # user interface elements that are enabled — which the user can
  # select or activate in some fashion (e.g. clicking on a button
  # with a mouse)
  | The :enabled pseudo-class represents user interface elements that
  | are in an enabled state — e.g. elements that the user can alter or
  | activate in some fashion, but that could be disabled in a different
  | context.

  # Similar to :enabled, :disabled allows the author to specify
  # precisely how a disabled or inactive user interface element should
  # look.
  | The :disabled pseudo-class represents user interface elements
  | that are in a disabled state — e.g. elements that could be enabled
  | but cannot currently be altered or activated by the user due to
  | its semantics.

  | 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.

Comments? Suggestions for improvement?

Received on Thursday, 6 November 2008 00:21:30 UTC

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