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

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.

Other use cases include the ability to include an excerpt from another 
list in a page while retaining the list item indexes, or breaking a long 
list across several pages.

e.g. Search results with 10 results per page could be marked up as a 
list: <ol start="1"> on the first page, <ol start="11"> on the second 
page, etc.

> 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?

I recall similar suggestions made on www-html in the past.  Something 
like this could be useful:

<ol id="part1">
   <li>Item 1</li>
   <li>Item 2</li>
   <li>Item 3</li>
</ol>

<ol id="part2" continue="part1">
   <li>Item 4</li>
   <li>Item 5</li>
   <li>Item 6</li>
</ol>

However, there are several issues that would need to be addressed:

* Should |continue| be an IDREF that can only continue a previous list 
in the same page, or should it be a URI that can continue lists from 
other pages?

* Can it be defined and implemented in a way that avoids circular 
references.  e.g.
   <ol id="part1" continue="part2"/>
   <ol id="part2" continue="part1"/>

* What does it mean if <ol contine="foo"> references a <ul id="foo">? 
Should it only be able to link lists of the same type?  (i.e. ol with 
another ol and ul with another ul)

* What does it mean if it references any other element that isn't a <ul> 
or <ol>?

* What should happen if it references a non-existent element?

* What does it mean if two lists continue from the same previous list?  e.g.
   <ol id="part1" continue="part2"/>
   <ol id="part2" continue="part1"/>
   <ol id="part3" continue="part1"/>

* How are references duplicate IDs handled in this situation? (That 
could probably be the same way <label for=""> handles it)

* Which takes precedence out of <ol continue="part1" start="2"> and <li 
value="3">?

* Backwards compatibility is also an issue, though it could possibly be 
handled with some JavaScript that dynamically calculates and sets the 
start attribute.

* Would implementations have difficulty with re-numbering list items in 
linked lists, when a new <li> is dynamically inserted into a previous list?

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Monday, 26 June 2006 23:46:42 UTC