[whatwg] Comment on Forms 2.0: OPTGROUP Nesting
Matthew Raymond
mattraymond at earthlink.net
Mon Jun 28 10:28:15 PDT 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)
>
> 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").
A while ago, I suggested the use of <select> as a way of
implementing menus. If nested <optgroup> elements were permitted, a
select could easily be used to define a menu. It could be defined like this:
<select type="menu" label="File" accesskey="f">
<optgroup label="New" accesskey="n">
<option label="Document">Document</option>
<option label="Template">Template</option>
<optgroup label="Web Application">
<option label="Web Forms 2.0">Web Forms 2.0</option>
<option label="XForms 2.0">XForms 2.0</option>
<option label="SVG 1.2">SVG 1.2</option>
<option label="XAML">XAML</option>
<option label="XUL">XUL</option>
</optgroup>
</optgroup>
<option label="Open" accesskey="o">Open</option>
<option label="Save" accesskey="s">Save</option>
<option type="menuseparator" disabled>-----</option>
<option label="Exit" accesskey="x">Exit</option>
</select>
More information about the whatwg
mailing list