[whatwg] :checked should match selected option elements

L. David Baron dbaron at dbaron.org
Fri Apr 30 12:07:48 PDT 2010


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/


More information about the whatwg mailing list