W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] optgroup element used for selection

From: Randy Drielinger <Randy@ProWebDesign.nl>
Date: Thu, 9 Apr 2009 15:15:39 +0200
Message-ID: <D10678794156401B880B5711A410E0AB@emea.inin.com>
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:

<select>
 <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>
 <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>
 </optgroup>
</select>

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.htm>
Received on Thursday, 9 April 2009 06:15:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC