W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2006

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

From: dolphinling <lists@dolphinling.net>
Date: Wed, 30 Aug 2006 02:49:27 -0400
Message-ID: <44F534F7.4020602@dolphinling.net>
Michel Fortin wrote:
> (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. 

What's more, it's not backwards compatible. I would *love* it if it were 
(especially because then fieldset could also go there, and repetition template 
attributes wouldn't have to apply to all elements), but current UAs turn 
<ul><ins><li>text</li></ins></ul> into <ins></ins><ul><li>text</li></ul>.

I suppose it could be made valid in XML and left explicitly undefined in HTML 
with a big red flashing warning to authors not to use it as it'll probably 
change in the future, and then in 5 years or so it'll be possible to change 
it... But that would be icky. And that assumes there's not already legacy 
content that uses it. :(

> To avoid the problem <ins> and 
> <del> could be made global attributes as some have suggested for href.

That would fail when you just wanted to remove a few words from a paragraph. And 
having both an element and an attribute would be confusing and, again, icky.

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

-- 
dolphinling
<http://dolphinling.net/>
Received on Tuesday, 29 August 2006 23:49:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:48 UTC