W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2010

[whatwg] :checked should match selected option elements

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 30 Apr 2010 12:07:48 -0700
Message-ID: <20100430190747.GA16306@pickering.dbaron.org>
http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#selector-checked
defines what elements match the :checked pseudo-class.  However, I
think it's missing an important case: selected option elements
within a select.

http://www.w3.org/TR/css3-selectors/#checked says:
  # For example, the :checked pseudo-class initially applies to such
  # elements that have the HTML4 selected and checked attributes as
  # described in Section 17.2.1 of HTML4, but of course the user can
  # toggle "off" such elements in which case the :checked
  # pseudo-class would no longer apply. 
which clearly shows that it's the intent of css3-selectors that the
pseudo-class apply in this case.

>From looking at VCS history, Gecko has implemented :checked on
option elements since Gecko 1.8 == Firefox 1.5.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Friday, 30 April 2010 12:07:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC