fix(ui): add focus-visible ring to ToggleSwitch and Sheet close (B1)

Keyboard-a11y polish to match the codebase's standard
`focus-visible:ring-[3px] focus-visible:ring-ring/40` treatment:

- ToggleSwitch (role=switch, used across every settings/config surface) had
  no focus-visible ring — keyboard users got no focus indicator.
- Sheet's close button used a bare `focus:outline-none`; now mirrors the
  Dialog close button's ring.

Slider, Button, Input, Select, Tabs, Checkbox, Switch already carry the ring.
This commit is contained in:
DrSmoothl committed 2026-06-16 14:10:04 +08:00
1 parent 636189d7c9
commit 6d4e8538ea
2 files changed
+2 -1

No files matched your search

@@ -21,6 +21,7 @@ export function ToggleSwitch({ value, onChange, ariaLabel, disabled }: ToggleSwi
onClick={() => onChange(!value)}
className={cn(
'relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors',
'outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
// Off-track is a neutral foreground tint so it stays visible on any
// surface — including OLED pure-black (where bg-muted vanished).