[whatwg] Comment on Forms 2.0: OPTGROUP Nesting

Ian Hickson ian at hixie.ch
Wed Jun 30 05:49:27 PDT 2004

On Mon, 28 Jun 2004, levik wrote:
> I think the web forms 2.0 spec should include support for nesting
> OPTGROUP tags inside of a SELECT element. Current OPTGROUP specification
> for some reason limits grouping to one level, which allows UAs to
> implement it in a fairly useless way (by inserting a non-selectable line
> item into the menu)

I did some research into the matter and it turns out that no existing
browser correctly parses nested OPTGROUPs. They basically all parse
OPTGROUP as if it had an optional end tag. So it wouldn't be possible to
allow nested OPTGROUPs, sadly.

> Nesting OPTGROUPs would allow hierarchical menu structures to be
> implemented for single-line SELECTs, and tree-like structures to be
> shown in multi-line select (ones with SIZE="x").

We will definitely be introducing trees in the Web Apps 1.0 specification.
Most use cases of trees don't seem to be directly related to form
submission, though, so we're probably going to optimise its design for the
interaction case rather than for the form submission case.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list