W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2009

[whatwg] List Headers

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Wed, 04 Feb 2009 21:03:35 +0000
Message-ID: <498A02A7.9050904@googlemail.com>
On 4/2/09 20:39, Garrett Smith wrote:
>   <ol style="list-style-type: iroha">
>     <lh>Dry:</lh>
>       <li>1c flour</li>
>       <li>1/4c sugar</li>
>       <li>1tsp baking soda</li>
>     <lh>Wet:</lh>
>       <li>1 egg</li>
>       <li>1/2c milk</li>
>       <li>1tsp vanilla extract</li>
>    </ol>

Hmm.

Does that markup solve any user problems that following traditional, 
markup does not?

    <ol style="list-style-type: iroha">
      <li class="list-header">Dry:
        <ol>
            <li>1c flour</li>
            <li>1/4c sugar</li>
            <li>1tsp baking soda</li>
        </ol>
      </li>
      <li class="list-header">Wet:
        <ol>
            <li>1 egg</li>
            <li>1/2c milk</li>
            <li>1tsp vanilla extract</li>
        </ol>
      </li>
     </ol>

Pros of lh:

* User agents could give a different default style to "LH" (e.g. bold in 
a visual medium, or reading "list header" in an speech medium).
* Fewer bytes.

Pros of traditional markup:

* Can style sublists without introducing new features to CSS.
* Works correctly in existing user agents (e.g. list navigation in 
screen readers).

--
Benjamin Hawkes-Lewis
Received on Wednesday, 4 February 2009 13:03:35 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC