Re: SELECT structures with lots of OPTIONs

On Wed, 8 Oct 1997, Al Gilman wrote:

> to follow up on what Dave Raggett said:
> > 
> > A compromise is to get the HTML-WG to agree to something like:
> > 
> > <form>
> >   <p>Nested selections
> >   <select name=pizza>
> >     <optgroup name=size>
> >       <option>medium
> [snip]
> 
> Can someone compare/contrast for me the structural semantics
> implied by this OPTGROUP element as compared with UL?

The idea of OPTGROUP is a way to represent a group of semantically
related options. In menus, this is often done using a horizontal
rule. In forms by a group box.  In some sense there is a similarity
between SELECT and UL.  Each describes an unordered list of things,
however its not practical to nest SELECT elements like UL in an LI
since this screws up current browsers. The OPTGROUP element is a
clean work around.

> PS: The case where the OPTION atoms are not all unique but
> require the setting of companion parameters to discriminate
> all the selectable cases is a case of a hierarchy of 
> SELECT structures.  Each level of sub-SELECT entered 
> identifies one parameter in the FORM and successive levels
> add parameter value nominations to the stack.  Nothing is
> committed unless the user makes it to the leaves of the 
> tree and designates a full vertical thread.  This is
> your basic pullright rule, no?

Pull-right is a visualization tactic. The abstraction is the
key thing for HTML. Each OPTION element must be unique but
several can have the same caption text provided they differ
in the value attribute. The uniquenes requirement is because
we can't easily extend SELECT to have hierarchical values
without problems for existing browsers. The OPTGROUP technique
will give us what we want though for accessibility.

Please let me know if you feel this is a sufficient priority
for HTML 4.0. We would have to put a clear case to the HTML-WG
togther with our proposal. Something which doesn't effect 
the code for visual browsers would be easier to get agreement
on.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2521 (office) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Thursday, 9 October 1997 09:05:32 UTC