Tabs
WAI-ARIA
- Roles: define what an element is or does.
- role=”tablist” for set of tabs.
- role=”tab” for each label/title of the tab panel.
- role=”tabpanel” for content which associated with a tab.
- Properties: it’s used to give them extra meaning or semantics.
- aria-controls: the relationship between tabs and tab panels.
- aria-labelledby: provides the user with a recognizable name of the tab.
- tabindex: set to -1 by javascript to move the focus.
- States: define the current conditions of elements.
- aria-selected: to notify when one or more items are selected.
- aria-hidden: to indicates that the element and all of its descendants are not visible or perceivable.
JAVASCRIPT
- Move the focus to the content by javascript once tab is triggered.
Collapse
WAI-ARIA
- Roles: define what an element is or does.
- role=”tablist” for set of tabs.
- role=”tab” for each label/title of the tab panel.
- Properties: it’s used to give them extra meaning or semantics.
- aria-controls: the relationship between tabs and tab panels.
- aria-labelledby: provides the user with a recognizable name of the tab.
- tabindex: set to -1 by javascript to move the focus.
- States: define the current conditions of elements.
- aria-expanded: to indicate the state of a collapsible element.
- aria-hidden: to indicates that the element and all of its descendants are not visible or perceivable.
JAVASCRIPT
- Move the focus to the content by javascript once tab is triggered.