Underline tabs switch between views of the same thing without leaving the page; link tabs, drawn the same way, move between pages that share one place.
When to use
Views or panels of one object or page: Global ID's vault ("Passwords", "Codes", "Notes"), the Games role preview, the Tamakkan dashboard ("Results", "Messages"), and its sign-in screen ("Sign in", "Create account") (D-CSN-16).
Link tabs (--nav) when each tab has its own address: Global ID's person record keeps the tab in the URL (?tab=roles), so a reload or a shared link opens the same tab (canonical §10.17).
When not to use
Setting a mode of the same content (card side, scan direction): a segmented button. Anything that swaps panels is tabs; anything that only sets a value is a segmented button (D-CAI-16).
One panel shown at a time inside a long page: an accordion.
Anatomy
Container (.oa-tabs): the list, then the panel 24px below it.
Tab list (__list): role="tablist" with an [aria-label]; a row on a 1px --color-outline-variant bottom edge that scrolls sideways when the tabs do not fit.
Tab (__tab): a <button type="button" role="tab">, 48px tall, 16px inline padding, label-md, never wrapping.
Icon (optional, __icon): 20px, 8px before the label; filled on the selected tab.
Indicator: a 3px primary-ink bar under the selected tab, inset 12px from both ends, its top corners rounded 3px (the tab's ::after).
Panel (__panel): role="tabpanel", labeled by its tab.
Link tabs (.oa-tabs--nav): a <nav aria-label> holding a ul.oa-tabs__list of <a class="oa-tabs__tab"> links; the current one has [aria-current="page"]; there is no panel element.
Variants
Variant
Use for
Key tokens
Underline tabs
Panels of one page, switched in place
--color-primary-ink (selected text and indicator), --color-on-surface-variant (rest), --color-outline-variant (list edge)
With icons
Tabs whose icon helps tell them apart (the Games role preview)
An 8% layer of the label color over the whole tab (--opacity-state-hover), only under (hover: hover); the selected primary-ink label keeps 5.99:1 light and 9.38:1 dark on surface under it (at least 4.70:1 and 4.53:1 on any surface).
Pressed
A 12% layer (--opacity-state-pressed), at once.
Focus-visible
The 3px ring drawn inside the tab (outline-offset: var(--size-focus-inset)), because the scrolling list clips (D-SEM-11).
Selected ([aria-selected="true"], or [aria-current="page"] on link tabs)
Label and icon primary-ink, the icon filled, the 3px indicator. The bar is the non-color cue.
Disabled
None: a tab that cannot open is left out.
Behavior
Automatic activation (APG tabs). The arrow keys move focus to the next or previous tab and select it at once; Home and End go to the first and last; the list wraps around. Only the selected tab is in the Tab order ([tabindex="0"], the rest -1); Tab moves on into the panel (D-CSN-16).
Right to left. In Arabic ArrowLeft goes forward and ArrowRight back, as the tabs run right to left.
Selected in view. Selecting a tab scrolls it into view inside the list (scrollIntoView({ block: 'nearest', inline: 'nearest' })); the list scrolls sideways (overflow-x: auto) and never wraps.
Panel. One panel shows the selected tab's content; give it [tabindex="0"] when it starts without a focusable element, so the keyboard reaches its text.
Link tabs. Plain links in the Tab order, no arrow keys; the page that opens marks its tab [aria-current="page"] and keeps the URL (?tab=roles), so a reload keeps the tab.
Motion. The indicator fades in over --duration-short-4--ease-standard, the label color over --duration-short-3; nothing slides or scales; under reduced motion both change at once (canonical §7.3).
Script contract (underline tabs), on keydown in the list:
const tabs = [...list.querySelectorAll('[role="tab"]')];
const i = tabs.indexOf(document.activeElement);
const rtl = getComputedStyle(list).direction === 'rtl';
const step = { ArrowRight: rtl ? -1 : 1, ArrowLeft: rtl ? 1 : -1 }[event.key];
const j = step !== undefined ? (i + step + tabs.length) % tabs.length
: event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : -1;
if (i < 0 || j < 0) return;
event.preventDefault();
select(tabs[j]); // aria-selected and tabindex on every tab, the panel's content and aria-labelledby, focus(), scrollIntoView()
Accessibility
role="tablist" with an [aria-label] ("Kinds of items"); each tab role="tab", [aria-selected], an id, and [aria-controls] pointing at the panel while it is shown; the panel role="tabpanel" with [aria-labelledby] its tab (canonical §10.17).
Link tabs: <nav aria-label="Person record"> of links; the current one [aria-current="page"]; no tab roles.
A tab's name is its visible label; icons are [aria-hidden="true"].
Targets: 48px tall, at least the label plus 32px wide (D-LAY-12).
Contrast: selected primary-ink on surface 6.79:1 light and 10.85:1 dark; rest on-surface-variant 8.88:1 and 10.87:1; the 3px indicator is the same primary-ink.
Forced colors: the indicator is drawn in Highlight, so the selected tab still shows.
Reduced motion: the indicator appears at once.
RTL and languages
The list follows the direction: in Arabic the first tab sits at the right; the arrow keys reverse; the indicator's inset is symmetric (D-BCP-30).
Icons do not mirror unless they are in the directional registry (canonical §8.3).
French labels run up to 32% longer (canonical §3.7): tabs never wrap or truncate, the list scrolls ("Rôles et affiliations", "Journal d’audit") (D-TYP-15).
Arabic labels take the taller Arabic line height inside the same 48px tab.
Content
Rule
English
Arabic
French
A short noun per view, 1–3 words, sentence case
Passwords · Codes · Notes
كلمات المرور · الرموز · الملاحظات
Mots de passe · Codes · Notes
The list's name says what the tabs sort
Kinds of items
أنواع العناصر
Types d’éléments
Link tabs name the record's sections
Overview · Roles and affiliations · Security · Audit log
نظرة عامة · الأدوار والانتماءات · الأمان · سجل التدقيق
Aperçu · Rôles et affiliations · Sécurité · Journal d’audit
Write "and", never "&" ("Roles and affiliations") (canonical §12.2). No verbs, no counts in a label, no Title Case.
Do and don't
Do
Don't
Use tabs to swap panels of one page.
Use tabs to set a value; that is a segmented button.
Let the list scroll sideways and keep the selected tab in view.