[whatwg] [HTML5] Named start values for lists?

dolphinling lists at dolphinling.net
Thu Jun 29 03:55:33 PDT 2006


dolphinling wrote:
> HTML5 brings back the |start| attribute on ordered lists. This allows a 
> list to semantically start with a number other than one. It seems like 
> the major use case for this is to split lists up, so that a single list 
> is marked by multiple <ol>s.
> 
> Would it therefore make sense to allow named start values, so that the 
> author doesn't have to go through and re-number everything when a new 
> item is added at the top? And if so, should they be considered 
> semantically one list? And if so, would it make sense for it to also 
> apply to unordered lists, so that they can be split up, too?
> 
> Or would all that be an abuse, and something that's one list should use 
> only one <?l> ?

I've thought a bit more, and *assuming semantically linked, 
automatically numbered split lists should be allowed* (which so far only 
one other person has even touched on!), I think the best solution would 
be something like the following:

<p>Chores for today:</p>

<ol listname="chores">
   <li>Clean living room</li>
   <li>Clean bathroom</li>
</ol>

<p>When cleaning bathroom, make sure to get all the grout between the 
shower tiles. Also, the sink needs to be scrubbed, too.</p>

<ol listname="chores">
   <li>Sweep kitchen</li>
   <li>Wash dishes</li>
</ol>

Numbering would start at 1, and continue in source order (superseded, of 
course, by any start= or value= attributes).

This gives the author the power to number however they want, while being 
much less complex spec- and implementation-wise. A few cases where a 
list is not only split, but the sections are rearranged on the page, 
require the author to fall back on start=, but since it doesn't actually 
remove any functionality, I think that's an acceptable tradeoff.

As for how this would interact with CSS Counters... It appears counters 
in CSS 3 are insufficient even to handle the already-in-spec start= and 
value= attributes. That should probably be taken up with the CSS WG.

-- 
dolphinling
<http://dolphinling.net/>



More information about the whatwg mailing list