When you have a group of content items that you want to show users one at a time, a tablist is usually desired.
Tablists is another common component on the web that does not have a native HTML5 implementation (i.e. there is no
such thing as a
>tablist< tag), although there is a group
of people who are working to eventually get this in the HTML5 specification).
ARIA Tablist Example
In order to make a tablist accessible, there are a few complications:
- Technically, tablists are a list of items, and choosing one from a group should involve the arrow keys (like how users navigate a group of radio buttons)
- Keyboard users may not know how this interaction works, and when they try to navigate through the tablist with a Tab key, they will be a bit confused when they skip over the whole list with one key press.
- While you can give screen reader user verbal instructions about how to interact with a tablist, keyboard users that don't use a screen reader won't hear them.
In order to fix this UX issue, I show the instructions visually to keyboard users only. These instructions don't appear for mouse users. They also don't appear for mobile screen reader users who don't use a keyboard. Our implementation "borrows" their visual design, while adding our own code to conform to the W3C's recommended UX for a tablist (their implementation, unfortunately, doesn't seem to work with a keyboard with some screen reader/browser combinations, like VoiceOver for Safari on OSX).
This issue has been handled in differently in Danger! ARIA tabs, written by Jeff Smith (TL;DR: He decided to not code them using ARIA tabs, but as a list of links that anchor to the tabpanels).
Ska's origins are from 1960s Jamaica. One theory about the origin of ska is that Prince Buster created it during the inaugural recording session for his new record label Wild Bells.
- The Skatellites
- Prince Buster
- Desmond Dekker
- Millie Small
- Byron Lee and the Dragonaires
- Laurel Aitken
- The Wailers
- Jimmy Cliff
- Eric "Monty" Morris
2 Tone Ska
The 2 Tone genre, which began in the late 1970s in the Coventry area of UK, was a fusion of Jamaican ska rhythms and melodies with punk rock's more aggressive guitar chords and lyrics. Compared to 1960s ska, 2 Tone music had faster tempos, fuller instrumentation, and a harder edge. The genre was named after 2 Tone Records, a record label founded by Jerry Dammers of The Specials.
- The Specials
- Bad Manners
- The Selector
- The Beat (a.k.a. "The English Beat" in the U.S.)
- The Body Snatchers
Third-wave ska originated in the punk scene in the late 1980s and became commercially successful in the 1990s. Although some third-wave ska has a traditional 1960s sound, most third-wave ska is characterized by dominating guitar riffs and large horn sections.
- The Toasters
- No Doubt
- The Mighty Mighty Bosstones
- Streetlight Manifesto
- The Hotknives
- The Slackers
- Suicide Machines
- Voodoo Glow Skulls
- Reel Big Fish
- Less Than Jake
- Bim Skala Bim
Example code explanation
Below is the HTML of the above example. Use the dropdown to highlight each of the individual steps that makes the example accessible.
- as an ES6 module using Webpack.
- as a native ES6 module within the browser.
If you haven't done so already, choosing which you should use is obviously a major architectural decision. Here are a few articles that will help you decide:
- Joe Honton discusses that With ES Modules and HTTP/2 You May Not Need Webpack Anymore
- Stack Overflow has a really good thread about Webpack vs ES6 modules as well.
Using NPM/Webpack to load ES6 Modules:
enable-a11yNPM project. Developers who are using webpack should know how to configure webpack to import the enable modules correctly.
You can use the module like this:
// import the JS module import tabs from '~enable-a11y/js/modules/tabs'; // import the CSS for the module import '~enable-a11y/css/tabs'; // How to initialize the tabs library tabs.init(); // If you are adding a new instance of this component after page load, // then do the following (where el is the DOM node of the newly created // element, which contains the CSS class .enable-tablist): el.add();
Alternatively, if you are using LESS you can include the styles in your project's CSS using:
Using ES6 modules natively.
This is the method that this page you are reading now loads the scripts.
- Grab the source by either using NPM, grabbing a ZIP file or cloning the enable source code from github.
If you want to load the module as a native ES6 module, copy
css/tabs.cssfrom the repo and put them in the appropriate directories in your project (all JS files must be in the same directory).
Load the CSS in the head of you document:
<html> <head> ... <link rel="stylesheet" href="path-to/css/tabs.css" > ... </head> <body> ... </body> </html>
Load your scripts using:
<script type="module"> import tabs from "path-to/tabs.js" tabs.init(); </script>
js/modules/es4directory instead of the