[whatwg] Lists, <ins>/<del>, and <a>

Michel Fortin michel.fortin at michelf.com
Tue Aug 29 11:09:26 PDT 2006


(Note that everything applying to normal lists in this message could  
also apply to definition lists and tables.)

The ongoing thread about a global href attribute versus a block-level  
<a> element made me think of a similar situation concerning <ins> and  
<del>. How can we markup removed or inserted list items? Here's a  
general idea:

     <ul>
     <ins><li>Some list item</li></ins>
     <del><li>Another list item</li></del>
     </ul>

But this is invalid. According to the spec the content model for <ul>  
is "zero or more <li> elements".

Changing this to allow the above markup has consequences on the DOM:  
for instance we could no longer iterate on the content of a list  
element and expect to catch all of its list items. To avoid the  
problem <ins> and <del> could be made global attributes as some have  
suggested for href.

I'm not advocating any solution right now, but I think the spec  
should be either changed to allow the above, or to add global  
attributes, or be clarified to explicitly disallow <ins> and <del>  
surrounding list items. Also, if links are to become applicable to  
block-level elements, I suggest it follows the same model.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/





More information about the whatwg mailing list