[whatwg] [html5] Numbering things other than <li>

On Sat, 8 Jan 2005, Matthew Thomas wrote:
> On 8 Jan, 2005, at 3:47 AM, Ian Hickson wrote:
> > ...
> > http://www.whatwg.org/specs/web-forms/current-work/#form-submission
> > ...
> > Incidentally, the markup in this section suggests to me that Web Apps 
> > is going to need to do something to HTML to handle this better. And 
> > suggestions?
> > ...
> 
> Yes, people have lots of fun trying to find the correct markup for this 
> situation. <http://simplebits.com/notebook/2004/04/20/sq.html>
> 
> [explanation of status quo]
> [explanation of how CSS doesn't introduce semantics]
> 
> I was going to suggest listtype= and liststart= attributes, to be 
> applied to any element (e.g. <tbody>) whose children you want treated as 
> a list, along with a listvalue= attribute for altering numbering of 
> children within the list itself. But then I realized that wouldn't work 
> for <dd>, because the container(s) surrounding a definition term or 
> terms, and the definition datum or data, are never explicit.
> 
> Then I was going to suggest a <list> element, with the same attributes 
> as <ol>, and the difference that it can be placed around any elements 
> you want treated as a list. But putting that around every set of <dd>s 
> in a <dl> would still be annoying.
> 
> So, um, I don't know. Perhaps listtype=, liststart=, listfor=, and
> listresetafter=? For example, <dl listfor="dd" listresetafter="dt"
> listtype="a">.

Well, we could allow

   <ol>
    <dt>First Step Title
    <dd><p>First step description goes here.
    <dt>Second Step Title
    <dd><p>Second step description goes here.
   </ol>

...and require that <dt>s in <ol>s get numbers. I'm not sure I like it 
though. We could also do a number of other things:

   <ol>
    <li>
     <legend>First Step Title</legend>
     <p>First step description goes here.
    <li>
     <legend>Second Step Title</legend>
     <p>Second step description goes here.
   </ol>

   <ol>
    <li>
     <p><strong>First Step Title</strong>
     <p>First step description goes here.
    <li>
     <p><strong>Second Step Title</strong>
     <p>Second step description goes here.
   </ol>

The latter has the advantage of already being correct in HTML4. HTML5 make 
it even more correct by explicitly saying that <strong> indicates 
importance (rather than just "emphasis").

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 28 February 2007 16:37:08 UTC