Accessibility

  • Each segment is a <button type="button"> with aria-pressed, and exactly one is "true". The set sits in role="group" with an aria-label that says what it chooses: "Show", "What to log".
  • Tab moves through the segments; Enter or Space selects. The content changes at once and focus stays where it is.
  • Targets: 36px inside a 44px track; above the 32px web minimum and the 24px of WCAG 2.2 AA, below the 48px phone target.
  • Contrast, light / dark: ink-muted on surface-sunken 5.9 / 7.2:1; ink on surface 17.4 / 14.4:1; the focus ring on paper 7.3 / 9.0:1.
  • Motion: the selection moves without animation.