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:
2 files changed
+2
-1
No files matched your search
@@ -52,7 +52,7 @@ const SheetContent = React.forwardRef<React.ElementRef<typeof DialogPrimitive.Co
|
||||
<DialogPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
||||
{children}
|
||||
{showClose && (
|
||||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none cursor-pointer">
|
||||
<DialogPrimitive.Close className="absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md opacity-70 transition-opacity hover:opacity-100 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40 cursor-pointer">
|
||||
<X className="size-4" />
|
||||
<span className="sr-only">Close</span>
|
||||
</DialogPrimitive.Close>
|
||||
|
||||
Reference in new issue
Block a user