W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2005

[whatwg] [WA1] <sl> - The Selection List element

From: J. Graham <jg307@hermes.cam.ac.uk>
Date: Tue, 7 Jun 2005 22:23:10 +0100 (BST)
Message-ID: <Pine.LNX.4.60.0506072208020.25199@hermes-1.csi.cam.ac.uk>
On Tue, 7 Jun 2005, Matthew Raymond wrote:

>    I presume you're referring to something like this:
>
> | <selectgroup classname="myclass1" multiple="False" />
> |
> | <table>
> |   <tbody>
> |     <tr>
> |       [...header row...]
> |     </tr>
> |     <tr class="myclass1">
> |       [...first row of block two data...]
> |     </tr>
> |     <tr class="myclass1">
> |       [...second row of block two data...]
> |     </tr>
> |     <tr class="myclass1">
> |       [...third row of block two data...]
> |     </tr>
> |   </tbody>
> | </table>

Yes.

>
>   This seems like a good way to handle it at first, but there are several 
> problems, not the least of which is the fact that

> you're creating a new 
> element that amounts to a semantic styling tag.

Eh? What's a semantic styling tag? What I'm saying is that, if we want 
things like selection to work declaratively, one possibility is to use an 
element to bind certian classes to a behavior. There are, of course, other 
possibilities - is a declarative solution even necessary? What could a UA 
do with selection (or drag/drop) information if js is turned off? Could 
one use a CSS/mozilla-XBL like solution instead (i.e.
.myclass {select:multiple;} ) - maybe not if we consider this to be 
'semantic' - but what does sXBL (or whatever it's called now) do?


> Another problem is that this 
> can cause serious problems if someone forgets to put the class name inside a 
> template, thus making all items created by a user unselectable. Or you could 
> have situations where simple misspellings make things unselectable.

Well, er, yes. In the same way that a  misspelling in any piece of 
javascript can prevent that code working, a misspelling in a class 
attribute can prevent the expected style selectors matching an element... 
These things are typically solved by testing. Why is this suggestion any 
harder to test than any other part of the language?
Received on Tuesday, 7 June 2005 14:23:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC