Basic Example
Loading...
Accessibility
Screen reader
Screen reader will read all tab labels in the group regardless if some are behind the overflow menu. Ensure that the nextArrowAccessibilityLabel and previousArrowAccessibilityLabel props are set if the tab list has overflow content
Keyboarding
Once a tab button is focused, other tabs can be selected by using the arrow keys, following the w3.org Tabs Design Pattern. Tabs are focus trapped, so pressing RightArrow on the last element will cycle back to the first element.
Tab:
- When focus moves into the tab list, places focus on the active tab element.
- When the tab list contains the focus, moves focus to the next element in the page tab sequence outside the tablist, which is the tabpanel unless the first element containing meaningful content inside the tabpanel is focusable.
When focus is on a tab element :
- Left Arrow: moves focus to the previous tab. If focus is on the first tab, this action moves focus to the last tab. Optionally, activates the newly focused tab (See note below).
- Right Arrow: Moves focus to the next tab. If focus is on the last tab element, this action moves focus to the first tab. Optionally, activates the newly focused tab (See note below).
- Space or Enter: Activates the tab.
Loading...