Tabs

Overview

Tabs are used on many websites when there are several different aspects of information to display. Having a tab setup allows for easier and faster navigation by users and does not tie up the webpage in contrast to having the data for the different aspects listed on page one after the other.

Be aware of how many tabs you have and the ability of the tab to fit on smaller screens. For responsiveness, tabs may be switched to [accordions] on smaller screen sizes. Alternatively, [accordions] may be a more useful approach if there are too many tabs or the tab labels are long. A maximum of 30 characters in length, including spaces if there are two tab choices; a maximum of 25 characters if there are three tabs and so on.

Contents

Design

This example is from the Data section of SAMHSA. tabs

Functionality

On default,

OnClick / OnTab of a tab, that tab becomes the selected tab, it is not longer clickable and appears visibly as disabled. The tabs’ content is exposed.

Accessibility

Focus Expectations

Labelling Expectations

Keyboard Expectations

Code

HTML

  ![tabs](../assets/img/forms/tabs.jpg "Tabs")

SCSS

  
- footer here -