E-mail List Archives
Re: Navigating from tab to tab panel
From: mhysnm1964
Date: Sep 27, 2017 5:56AM
- Next message: Birkir R. Gunnarsson: "Re: Navigating from tab to tab panel"
- Previous message: Shane Anderson: "Re: data table without visual headers"
- Next message in Thread: Birkir R. Gunnarsson: "Re: Navigating from tab to tab panel"
- Previous message in Thread: Mohith BP: "Re: Navigating from tab to tab panel"
- View all messages in this Thread
Extracted this from the ARIA best practise 1.1 guide which is what you are saying:
Permalink for 2.23 Tabs
Tabs are a set of layered sections of content, known as tab panels, that display one panel of content at a time. Each tab panel has an associated tab element,
that when activated, displays the panel. The list of tab elements is arranged along one edge of the currently displayed panel, most commonly the top edge.
Terms used to describe this design pattern include:
definition list of 4 items
Tabs or Tabbed Interface
A set of tab elements and their associated tab panels.
Tab List
A set of tab elements contained in a
tablist
element.
tab
An element in the tab list that serves as a label for one of the tab panels and can be activated to display that panel.
tabpanel
The element that contains the content associated with a tab.
list end
When a tabbed interface is initialized, one tab panel is displayed and its associated tab is styled to indicate that it is active. When the user activates
one of the other tab elements, the previously displayed tab panel is hidden, the tab panel associated with the activated tab becomes visible, and the tab
is considered "active".
Examples
list of 2 items
- Tabs With Automatic Activation:
A tabs widget where tabs are automatically activated and their panel is displayed when they receive focus.
- Tabs With Manual Activation:
A tabs widget where users activate a tab and display its panel by pressing Space or Enter.
list end
Keyboard Interaction
For the tab list:
list of 3 items
- 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 typically either the first focusable element inside the tab panel or the tab panel itself.
- When focus is on a tab element in a horizontal tab list:
list of 2 items nesting level 1
◦ Left Arrow: moves focus to the previous tab. If focus is on the first tab, 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, moves focus to the first tab. Optionally, activates the newly focused
tab (See note below).
list end nesting level 1
- When focus is on a tab in a tablist with either horizontal or vertical orientation:
list of 5 items nesting level 1
◦ Space or Enter: Activates the tab if it was not activated automatically on focus.
◦ Home (Optional): Moves focus to the first tab
◦ End (Optional): Moves focus to the last tab.
◦ Shift + F10: If the tab has an associated pop-up menu, opens the menu.
◦ Delete (Optional): If deletion is allowed, deletes (closes) the current tab element and its associated tab panel. If any tabs remain, sets focus to the
tab following the tab that was closed and activates the newly focused tab. Alternatively, or in addition, the delete function is available in a context
menu.
list end nesting level 1
list end
NOTE
list of 3 items
1. It is recommended that tabs activate automatically when they receive focus as long as their associated tab panels are displayed without noticeable latency.
This typically requires tab panel content to be preloaded. Otherwise, automatic activation slows focus movement, which significantly hampers users' ability
to navigate efficiently across the tab list. For additional guidance, see
4.4 Deciding When to Make Selection Automatically Follow Focus.
2. If the tabs in a tab list are arranged vertically:
list of 2 items nesting level 1
A. Down Arrow performs as Right Arrow is described above.
B. Up Arrow performs as Left Arrow is described above.
list end nesting level 1
3. If the tab list is horizontal, it does not listen for Down Arrow or Up Arrow so those keys can provide their normal browser scrolling functions even
when focus is inside the tab list.
list end
WAI-ARIA Roles, States, and Properties
list of 8 items
- The element that serves as the container for the set of tabs has role
tablist.
- Each element that serves as a tab has role
tab
and is contained within the element with role tablist.
- Each element that contains the content panel for a tab has role
tabpanel.
- Each element with role tab has the property
aria-controls
referring to its associated tabpanel element.
- The active tab element has the state
aria-selected
set to true and all other tab elements have it set to false.
- Each element with role tabpanel has the property
aria-labelledby
referring to its associated tab element.
- If a tab element has a pop-up menu, it has the property
aria-haspopup
set to true.
- If the tablist element is vertically oriented, it has the property
aria-orientation
set to vertical. The default value of aria-orientation for a tablist element is horizontal.
list end
Sorry if the links did not come through correctly for the examples.
Sean
- Next message: Birkir R. Gunnarsson: "Re: Navigating from tab to tab panel"
- Previous message: Shane Anderson: "Re: data table without visual headers"
- Next message in Thread: Birkir R. Gunnarsson: "Re: Navigating from tab to tab panel"
- Previous message in Thread: Mohith BP: "Re: Navigating from tab to tab panel"
- View all messages in this Thread