[whatwg] List Headers

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