W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2014

Re: [whatwg] relationship between labeled control and label for :active and :hover pseudos

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 10 Nov 2014 10:38:03 -0500
Message-ID: <5460DBDB.8000508@mit.edu>
To: whatwg@lists.whatwg.org
On 11/10/14, 9:23 AM, Florian Rivoal wrote:
> that authors occasionally ask for by the ability to style the label based on the state of the labeled control

"The label", or "the labels"?

The problem of "hover the control if the label is hovered" is simple: 
the label already has a reference to the control it's labeling; when an 
element enters hover state you at worst have to deal with one other 
element (plus their ancestors) entering hover state.

And even that gets a bit complicated given the "ancestors" thing.

The backreference, however, is a one-to-many relationship, which makes 
things quite complicated, or fairly slow, or both, when multiple labels 
label the same form control.  So I would be a bit careful here.

-Boris
Received on Monday, 10 November 2014 15:38:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:32 UTC