Re: [selectors] applying pseudo classes to the label based on the labeled control

> On 02 Dec 2014, at 01:22, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Thu, Nov 27, 2014 at 1:53 AM, Simon Pieters <simonp@opera.com> wrote:
>> I'm not sure web developers would expect a selector like *:invalid to match
>> labels. Maybe instead we should have a dedicated mechanism to target a
>> control's labels?
>> 
>> e.g.
>> 
>> label:for(*:invalid)
> 
> Yeah, either one works I suppose.

This works, and is more generic if you can have arbitrary selectors in the :for(), which is nice.

On the other hand, the current approach taken by selectors for these things (see :hover, :active, :has-focus) is too define a hook and leave it up the the host language to define what that matches.

Does SVG take advantage of this? Do we expect it to?
Do we expect HTML to do something else than label<->labeled-control matching with this?
Any other relevant host language to care about?

Wondering how much extensibility we’d actually lose if we didn’t go through the host language hook.

 - Florian

Received on Tuesday, 2 December 2014 13:09:23 UTC