Skip to content

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

fix: Skip to main content link should be visible when focused (#48303)

Gildas Garcia2a17985a1c79
diff --git a/apps/studio/components/layouts/DefaultLayout.tsx b/apps/studio/components/layouts/DefaultLayout.tsx
index 2c35cca6353..0d507baaca3 100644
--- a/apps/studio/components/layouts/DefaultLayout.tsx
+++ b/apps/studio/components/layouts/DefaultLayout.tsx
@@ -1,7 +1,14 @@
import { useBreakpoint, useParams } from 'common'
import { useRouter } from 'next/router'
import { PropsWithChildren, useEffect, useState } from 'react'
-import { ResizablePanel, ResizablePanelGroup, SidebarProvider, usePanelRef } from 'ui'
+import {
+ buttonVariants,
+ cn,
+ ResizablePanel,
+ ResizablePanelGroup,
+ SidebarProvider,
+ usePanelRef,
+} from 'ui'
import { BannerStack } from '../ui/BannerStack/BannerStack'
import { LayoutHeader } from './Navigation/LayoutHeader/LayoutHeader'
@@ -94,7 +101,17 @@ export const DefaultLayout = ({
<ProjectContextProvider projectRef={ref}>
<MobileSheetProvider>
<div className="flex flex-col h-screen w-screen">
- <a className="sr-only" href="#main" tabIndex={0}>
+ <a
+ className={cn(
+ buttonVariants({
+ size: 'xlarge',
+ variant: 'primary',
+ }),
+ 'absolute top-0 left-1/2 -translate-x-1/2 -translate-y-full focus:translate-y-4'
+ )}
+ href="#main"
+ tabIndex={0}
+ >
Skip to content
</a>
{/* Top Banner */}