Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: switch fields aren't accessible with tab on Safari (#45083)

Gildas Garciacf3569c16dea
diff --git a/packages/ui/src/components/shadcn/ui/switch.tsx b/packages/ui/src/components/shadcn/ui/switch.tsx
index b0c1d23a5bc..0a40f0ed268 100644
--- a/packages/ui/src/components/shadcn/ui/switch.tsx
+++ b/packages/ui/src/components/shadcn/ui/switch.tsx
@@ -50,6 +50,7 @@ const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>,
({ className, size, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(switchRootVariants({ size }), className)}
+ tabIndex={0}
{...props}
ref={ref}
>
diff --git a/packages/ui/src/components/shadcn/ui/toggle.tsx b/packages/ui/src/components/shadcn/ui/toggle.tsx
index c60fd746f1c..25b3998df30 100644
--- a/packages/ui/src/components/shadcn/ui/toggle.tsx
+++ b/packages/ui/src/components/shadcn/ui/toggle.tsx
@@ -35,6 +35,7 @@ const Toggle = React.forwardRef<
<TogglePrimitive.Root
ref={ref}
className={cn(toggleVariants({ variant, size, className }))}
+ tabIndex={0}
{...props}
/>
))