Re: HEADERS, FOR whom - any ID?

2007/8/6, Jon Barnett <jonbarnett@gmail.com>:
>
> But using @for becomes cumbersome: 99 form fields leads to 99 unique
> @id attributes and 99 @for attributes.  It's cumbersome, but it's the
> only option.  Someone might propose an alternative that would simplify
> this if they wanted, where @for contained an XPath:
> for="../following-sibling::dt/input" - that would prevent the need for
> 99 unique IDs on the page by instead using 99 identical @for
> attributes.  I'm not specifically proposing this, but that's an
> example how syntax can be markup can be simplified for authors in a
> way that keeps semantics.
>

It could be made even simpler for general use if it could point (for
example by default) to the next input element.

So maybe if we are going to think about labels, we can think if it's
interesting allowing a magic keyword in the for attribute so it can
point to the next (or previous) input element in the DOM tree,
(unless the label already contains an input as a child, in that case
the spec already covers it and I think that only IE doesn't know about
it)

Or maybe that's very easy to do with XPath, but I admit that I never
had the time to learn properly how to use it.

Regards

Received on Monday, 6 August 2007 20:16:04 UTC