:hover and :active interaction with labels

Consider this testcase:

   <!DOCTYPE html>
   <style>
     input { color: black; }
     input:hover { color: white; }
   </style>
   <label for="x">Hover me</label>
   <input id="x" type="button" value="A button">

Observed behavior in browsers is that hovering the label puts the button 
into :hover state in WebKit but not in Gecko, Presto, or Trident. 
Similar for :active.

However for controls that have native themed hover/active state, at 
least Gecko and Trident _do_ put the control into that native themed 
state when the label is hovered or activated.  They just don't change 
the actual CSS-exposed :hover and :active state.

See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=426082 
where we implemented the current Gecko behavior.

I would like to change the Gecko behavior here to match WebKit's, both 
because it would eliminate this weird dichotomy between native theme 
state and CSS state and because frankly it happens to be simpler to 
implement given some other changes I'm making.  ;)

Should the spec describe behavior here?  Would Opera and Microsoft be 
willing to match WebKit and Gecko on this?

-Boris

Received on Tuesday, 10 May 2011 03:45:47 UTC