The idea
An experiment
I wanted to contemplate the puzzle of handling tabs in JS, and I had a couple of days. This is the result.
A first attempt at acccessibility was made, but there's further to go.
If you want tabs to use in production, I've since found these, which are far better:
Tabbed Interfaces | Inclusive Components.
Delicious vanilla
No frameworks.
No funny business.
Neat features
Independent containers
Have as many sets of tabs as you want!
They won't confuse each other.
Optional default active tab
The first tab will be active on load, by default.
Override this by setting a class of active-tab-control
on any of the tabs.
Any number of tabs
The JS can handle it.
The CSS is up to you.