Skip to content

Commit efb68bb

Browse files
committed
a11y: skip-to-main-content link in layout shell
1 parent 7b25987 commit efb68bb

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/components/layout-shell.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@ export function LayoutShell({ children }: { children: ReactNode }) {
1414
<PerformanceProvider>
1515
<ThemeProvider defaultTheme="dark">
1616
<div className="flex min-h-screen flex-col">
17+
<a
18+
href="#main-content"
19+
className="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[100] focus:rounded-md focus:bg-primary focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:text-primary-foreground"
20+
>
21+
Skip to main content
22+
</a>
1723
<SiteHeader onOpenCommand={() => setOpen(true)} />
1824
<CommandMenu open={open} onOpenChange={setOpen} />
19-
{children}
25+
<main id="main-content" className="flex-1" tabIndex={-1}>
26+
{children}
27+
</main>
2028
<footer className="w-full border-t mt-16">
2129
{/* Stats row */}
2230
<div className="border-b border-border/50">

0 commit comments

Comments
 (0)