[whatwg] optgroup element used for selection

Randy Drielinger Randy at ProWebDesign.nl
Thu Apr 9 06:15:39 PDT 2009

Currently (HTML4.01) and in the near-future HTML5 spec optgroup elements are used to group options (hence the name :-) and amongst others allow us to disable a group of option elements at once.

Personally, I think it would make sense to add the ability to make an optgroup selectable. The result *could* be to select all the childs of that optgroup element (or simply post the child values as an array or whatever).

I've searched through the archive and only found discussions regarding nested optgroups.

In a form submission case it would make sense as optgroups are used to subcategorize options. If optgroups are used in for example search pages on websites, it would allow users to only select an optgroup to select all of it's childs in, as an example, the following scenario:

 <optgroup label="Excel">
   <option label="Excel 2000">Excel 2000</option>
   <option label="Excel 2002">Excel 2002</option>
   <option label="Excel 2003">Excel 2003</option>
   <option label="Excel 2007">Excel 2007</option>
 <optgroup label="Word">
   <option label="Word 2000">Word 2000</option>
   <option label="Word 2002">Word 2002</option>
   <option label="Word 2003">Word 2003</option>
   <option label="Word 2007">Word 2007</option>

Would all of the above make sense? Or don't y'all encounter issues related to form usability at the moment?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090409/5763fe2b/attachment-0001.htm>

More information about the whatwg mailing list