W3C home > Mailing lists > Public > www-html@w3.org > September 2007

XHTML: Combining list elements altogether

From: Yahia Chlyeh <cyahia@gmail.com>
Date: Tue, 18 Sep 2007 18:21:09 -0000
To: 3w-html <www-html@w3.org>
Message-ID: <op.tyu3xjsnbhoi91@poste0>

Hello,

On the XHTML2 drafts I see 3 list elements that fulfill the same purpose:  
being a list. These elements are <nl/>, <ul/> and <ol/>. Plus there are  
suggestions to add even more. (<toc/> anyone?)

I have to agree that <nl/> is a good idea, but why not have a simple list  
handle navigation while having a role="nav" or something similar? I think  
user agents might not have a problem with identifying the attribute and  
incidentally making this navigational list special.

If this is thought about, we should then, on XHTML2, get back to the  
current model of ordered and unordered lists. But, since XHTML2 is very  
different from the previous languages, then why not seize this opportunity  
and settle the lists problem once and for all? What I'm suggesting is,  
instead of having three different element names for the same thing:

<ul><label/><li/><li/></ul>
<ol><label/><li/><li/></ol>
<nl><label/><li/><li/></nl>

We could just make lists easier by writing them this way:

<list><label/><li/><li/></list>

with their default presentation being _unordered_ (making them ordered  
would then be done with CSS).

I think that being unordered by default is the best way to go. While it's  
possible to style with CSS like I said earlier, I think that text-only UAs  
would need a way to display ordered lists, this is why an attribute may be  
needed (<list type="ordered">), but I'm not sure.

So, to summarize:

<list/> instead of <ul/>
<list role="nav"/> instead of <nl/>
<list type="ordered"/> or <list ordered="ordered"/> instead of <ol/>

Wouldn't this remove the clutter of unnecessary elements?

The <dl/> element would stay out of this.

I searched but haven't found a thread about this, so I don't know if a  
similar suggestion has been done.
-- 
Yahia Chlyeh
<http://yahia.ma/>
Received on Tuesday, 18 September 2007 18:21:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:11 GMT