W3C home > Mailing lists > Public > www-style@w3.org > April 2003

Re: ID selector via attribute?

From: David Woolley <david@djwhome.demon.co.uk>
Date: Tue, 22 Apr 2003 07:40:33 +0100 (BST)
Message-Id: <200304220640.h3M6eYF02569@djwhome.demon.co.uk>
To: www-style@w3.org

> For instance, something like (this syntax isn't too good though):
> 
>   <label for="me">text</label> <input .. id="me">

This is a degenerate case, as it can be done (on a compliant browser - for
real world HTML, the "for" is needed, but hopefully this would be fixed
before any new feature would be added):

<label>text<input...></label>
> 
> If not that, then how about a specific selector just for form labels?

In the general case, and given that the mechanism would not be limited
to :active, any implementation would require the renderer to stall or
be prepared to backtrack on encountering any possible target of a 
label.

A lot of proposals these days seem to require backtracking/lookahead,
but I think one should always think carefully before addiing features
which require it.  On a non-backtracking renderer, this particular case
would force a lookahead, I think to the end of the document, for a large
sub-class of documents containing forms.
Received on Tuesday, 22 April 2003 02:41:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:21 GMT