[whatwg] Have tabstrip / tab elements been discussed?

Tab Atkins Jr. jackalmage at gmail.com
Sat Aug 28 15:40:34 PDT 2010

On Sat, Aug 28, 2010 at 3:32 PM, E.J. Zufelt <lists at zufelt.ca> wrote:
> It is important to provide semantic markup for complex UI controls where they are common, tabstrip/tab is one example of a common UI component that requires markup.  This way meaningful information about the role of the component can be communicated to UAs.  Particularly important for users who access the web non-visually, and who cannot rely upon the visual affordances of styled lists made to look like a tabstrip.

The semantics of a tab strip is simply "several sections with
headers".  That is, the following:

    <tab>First one</tab>
    <tab>Second one</tab>
    <tab>Third one</tab>
    <card>I'm the first card</card>
    <card>I'm the second card</card>
    <card>I'm the third card</card>

...is semantically equivalent to one or the other of the following:

  <h1>First one</h1>
  I'm the first card.
  <h1>Second one</h1>
  I'm the second card
  <h1>Third one</h1>
  I'm the third one

    <li><a href=#one>First one</a></li>
    <li><a href=#two>Second one</a></li>
    <li><a href=#three>Third one</a></li>
<section id=one>I'm the first one</section>
<section id=two>I'm the second one</section>
<section id=three>I'm the third one</section>

You can choose which is more appropriate for your particular usage.
Turning either of those into a cardstack visually is the job of CSS.


More information about the whatwg mailing list