[whatwg] Nested optgroups

Ian Hickson ian at hixie.ch
Fri Jun 12 17:51:06 PDT 2009


On Thu, 4 Jun 2009, Brett Zamir wrote:
> > On Mon, 13 Apr 2009, Markus Ernst wrote:
> > >
> > > I found a message in the list archives from July 2004, where Ian 
> > > announced to put nested optgroups back into the spec: 
> > > http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2004-July/001200.html
> > > 
> > > Anyway in the current spec, the optgroup element is not allowed 
> > > inside another optgroup element: 
> > > http://www.whatwg.org/specs/web-apps/current-work/#the-optgroup-element
> > > 
> > > Has this been removed again since 2004? I did not find more on this 
> > > in the list archives.
> > 
> > Yeah, this was removed because we couldn't find a good way to get 
> > browsers to support it without breaking backwards compatibility with 
> > legacy content (which relies on the non-nesting parser behaviour).
>
> Would there be a way to allow a new element to trigger this behavior 
> (maybe deprecating optgroup as well if an attribute on the new element 
> could indicate compactness)?

This is a possibility, but I think we have enough form feature changes in 
HTML5 for now; this is something that'd be best reexamined in a future 
version.


> Along the lines of expanding HTML more toward regular applications, I 
> would think this could help quite nicely for building menu bars or the 
> frequently used navigation bars recommended by accessibility guidelines 
> without JavaScript (CSS-only ones are rare)...

You can do nested menus with menu buttons and context menus using 
the <menu> element, which is more or less what you're describing.

-- 
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