Improve accessibility to meet WCAG 2.1 Level AA standards. Changes: Added eslint-plugin-jsx-a11y, keyboard navigation, ARIA labels, SkipLink component, main-content landmark. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
902 B
TypeScript
36 lines
902 B
TypeScript
'use client';
|
|
|
|
import { Header } from '@/components/layout/Header';
|
|
import { Sidebar } from '@/components/layout/Sidebar';
|
|
import { useUIStore } from '@/stores/ui-store';
|
|
import { AuthGuard } from '@/components/providers/AuthGuard';
|
|
import { SkipLink } from '@/components/ui/skip-link';
|
|
|
|
export default function DashboardLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const sidebarOpen = useUIStore((state) => state.sidebarOpen);
|
|
|
|
return (
|
|
<AuthGuard>
|
|
<SkipLink />
|
|
<div className="min-h-screen">
|
|
<Header />
|
|
<div className="flex">
|
|
<Sidebar />
|
|
<main
|
|
id="main-content"
|
|
className={`flex-1 transition-all duration-200 ${
|
|
sidebarOpen ? 'ml-64' : 'ml-0'
|
|
}`}
|
|
>
|
|
<div className="p-6">{children}</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</AuthGuard>
|
|
);
|
|
}
|