Case #4

Skip to the tabs

About Case #4

  • same as Case #3, except that,
  • each tab menu link targets the relevant h2 in the previously hidden tab div, and not an a element within that h2
  • this would be my preferred version with respect to markup since linking to an id on the desired element seems cleaner and preferable to the use of an additional, non-linked a element as internal page anchor; also, this version requires no dynamic rewriting of a single h2 to serve as the heading for every tab
  • of course, tabindex="-1" is even less valid on a heading element (though it is completely valid in HTML5); but again, what's a minor invalid attribute if the user experience and accessibility is improved and no otherwise ill effects are caused?
  • JavaScript file: accTabs4.js

Issues

JAWS

  • perhaps even more surprisingly with this case, JAWS 9, 10, and 11 don't seem to have a problem following focus in IE8 or FF3.6; but again, IE6 just won't follow focus

NVDA

  • NVDA 2009.1 does well in FF3.6 with this version as well
  • interestingly, though, when using NVDA with IE8, focus seems to go to the right spot, but NVDA just doesn't read the h2 properly

Note regarding Safari

  • while I've never really understood Safari's known "quirky" behaviour setting keyboard focus to internal links, and whereas in Ginader's Accessible Tabs, as well as in Case #1, Case #2, and Case #3, Safari won't set keyboard focus to the target, it will in this version (presumably because it doesn't use a elements as targets?).

First Tab's Text

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur blandit tellus nec turpis. In at sem. Nunc tempus sem. Morbi tincidunt diam vitae purus. Nulla facilisi. Curabitur facilisis ligula ut dui. Vivamus placerat, libero ut convallis elementum, urna nisi nonummy libero, eu porttitor ante neque eu nulla.

Quisque ac velit. Phasellus ac eros in sapien congue elementum. Donec vitae massa vitae magna rutrum placerat. Vestibulum tortor. Cras vitae justo at nisi commodo euismod.

Second Tab's Text

Aliquam vehicula justo ut metus. Maecenas sollicitudin, leo vel eleifend consectetuer, ligula magna hendrerit massa, a facilisis eros tellus non arcu. Quisque pulvinar, metus sed ullamcorper lacinia, nulla nibh consequat libero, ac nonummy quam diam ut neque. Suspendisse interdum lacinia nulla.

Quisque dapibus feugiat magna. Nunc velit erat, congue eget, tristique et, scelerisque id, quam. Phasellus nonummy enim in pede. Phasellus metus nibh, ultrices convallis, auctor aliquet, suscipit eu, nisi.

Third Tab's Text

Sed ut lectus in tellus blandit dapibus. Mauris elit quam, fringilla vel, luctus eu, molestie sit amet, diam. Quisque dapibus feugiat magna. Nunc velit erat, congue eget, tristique et, scelerisque id, quam. Phasellus nonummy enim in pede. Phasellus metus nibh, ultrices convallis, auctor aliquet, suscipit eu, nisi.

A Bunch of Text Between the Sets of Tabs

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur blandit tellus nec turpis. In at sem. Nunc tempus sem. Morbi tincidunt diam vitae purus. Nulla facilisi. Curabitur facilisis ligula ut dui. Vivamus placerat, libero ut convallis elementum, urna nisi nonummy libero, eu porttitor ante neque eu nulla.

Quisque ac velit. Phasellus ac eros in sapien congue elementum. Donec vitae massa vitae magna rutrum placerat. Vestibulum tortor. Cras vitae justo at nisi commodo euismod.

Tab A's Text

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur blandit tellus nec turpis. In at sem. Nunc tempus sem. Morbi tincidunt diam vitae purus. Nulla facilisi. Curabitur facilisis ligula ut dui. Vivamus placerat, libero ut convallis elementum, urna nisi nonummy libero, eu porttitor ante neque eu nulla.

Quisque ac velit. Phasellus ac eros in sapien congue elementum. Donec vitae massa vitae magna rutrum placerat. Vestibulum tortor. Cras vitae justo at nisi commodo euismod.

Tab B's Text

Aliquam vehicula justo ut metus. Maecenas sollicitudin, leo vel eleifend consectetuer, ligula magna hendrerit massa, a facilisis eros tellus non arcu. Quisque pulvinar, metus sed ullamcorper lacinia, nulla nibh consequat libero, ac nonummy quam diam ut neque. Suspendisse interdum lacinia nulla.

Quisque dapibus feugiat magna. Nunc velit erat, congue eget, tristique et, scelerisque id, quam. Phasellus nonummy enim in pede. Phasellus metus nibh, ultrices convallis, auctor aliquet, suscipit eu, nisi.

Tab C's Text

Sed ut lectus in tellus blandit dapibus. Mauris elit quam, fringilla vel, luctus eu, molestie sit amet, diam. Quisque dapibus feugiat magna. Nunc velit erat, congue eget, tristique et, scelerisque id, quam. Phasellus nonummy enim in pede. Phasellus metus nibh, ultrices convallis, auctor aliquet, suscipit eu, nisi.