Accessibility

  • Roles: role="tablist" with a name (aria-label="Studio project"); role="tab" on each button, with aria-selected and aria-controls; role="tabpanel" on each panel, with aria-labelledby and tabindex="0". Hide the other panels with hidden.
  • Keyboard: Tab lands on the selected tab only (the others have tabindex="-1"). Left and Right arrows move to the previous or next tab and select it, wrapping at the ends; Home and End go to the first and the last. Tab again moves into the panel.
  • Targets: tabs are 48px tall (size-control-lg) and as wide as their label.
  • Contrast: rest labels, ink-muted on paper, 6.4:1 in light and 8.9:1 in dark; the selected label and the indicator, ink on paper, 16.7:1 and 15.9:1; the focus ring, 7.3:1 and 9.0:1.
  • Motion: none; the indicator moves to the new tab at once.