Adding label to other list elements?

In a recent post entitled "XHTML 2.0 List Module negates the semantic
usefulness of definition lists." I mentioned that the specification lacked a
"more general/neutral list element
that relates two items together (like a DT DD pair)". The motivation for
this was to reduce the need for authors to "abuse" the definition list to
model labelled dialogues for example.

Having thought about it I would like to propose that the label element
introduced with navigation lists be introduced into ordered and unordered
lists. The motivation for this is that these more content neutral elements
will now be able to utilised instead of wresting the semantics of a
definition list. We will now have a proper mechanism for associating labels
with normal list items.

Use Case: modelling a dialogue.

<ol>
 <label>Dave</label>
 <li>Hi, how are you doing?</li>
 <label>Kieran</label>
 <li>Fine Thanks, and you?</li>
 <label>Dave</label>
 <li>Doing well, I got that job I applied for at CERN so I am really
pleased.</li>
</ol>

produces (with suitable css of course)

Dave
  Hi, how are you doing?
Kieran
  Fine Thanks, and you?
Dave
  Doing well, I got that job I applied for at CERN so I am really pleased.


So does this idea have legs then? Perhaps a different element name than
label(although I think it's quite neat)?

Ben Meadowcroft
http://www.benmeadowcroft.com

Received on Saturday, 31 May 2003 08:46:10 UTC