Estimated reading time : 4 min · Published
Check that panels concern one object
Name the shared object: a product, case file or result. Labels then describe different views of it. A collection of unrelated services is more likely navigation than a tabbed interface.
Decide how to share a view, return after reloading and print the information. Compact presentation should not prevent finding content from an external reference. When comparing offers, check whether hiding other panels demands memorising too many details.
Match activation to loading
The W3C tabs pattern distinguishes moving between tabs and activating them. Automatic activation suits content that appears without noticeable delay. Manual activation avoids starting a request at every move. Selection and keyboard focus should remain distinguishable.
Specify behaviour after a failed request. A panel title, waiting message and retry option help explain the state. Do not show old data under a new heading without making clear that it does not yet belong to the requested view.
Track three things separately: the focused tab, the tab with aria-selected set to true and the panel actually displayed. In a manually activated tab bar, arrow keys can move focus while leaving the panel unchanged; Enter or Space activates the new view. Each tab references its panel with aria-controls, and each panel gets its name through aria-labelledby. These identifiers must target the correct elements without duplicates.
Tab passes through the bar as one component rather than stopping at every label. If a panel starts with text without a focusable element, tabindex="0" on the panel provides keyboard access. Controls in hidden panels must stay out of the tab sequence. Check Up and Down in a vertical bar; in a horizontal bar, leave those keys available for normal page scrolling.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Test action | Expected state | Revealing failure |
|---|---|---|
| Arrow key in a manual tab bar | Focus changes tabs; the previous panel stays active. | The panel switches despite the intended manual activation. |
| Enter or Space on the focused tab | Selection and the visible panel match the new tab. | The selected label does not match the visible data. |
| Tab out of the bar | The next stop provides access to the active panel content. | Every label is visited, or the content cannot be reached. |
| Checking a hidden panel | Its controls cannot receive focus while it is hidden. | An invisible field can be edited with the keyboard. |
- W3C APG : Tabs
Guidance consulted on 22 October 2026; choose and document activation mode before acceptance testing.
Preserve input and reading context
Changing panels should not silently discard entered data. Define what remains provisional in the form and what has actually been saved. If a change must be abandoned, an explicit decision is better than an unexplained loss.
On mobile, labels should remain reachable without confusing scrolling with switching views. Try a long translation, zoom and five tabs. If the arrangement becomes awkward, sections with a contents list may be simpler to maintain.
Example: read and edit a case file
Educational example: Summary, History and Documents concern the same case. Reading History does not alter it. A form in Summary retains input when Documents opens; a separate command saves changes. Testing distinguishes the selected view, provisional data and confirmed saving.
Reference documents
- W3C tabs pattern · Source consulted
- W3C WAI : ARIA Authoring Practices · Source consulted
Content updated on
