fix(web): add skip-to-content link for WCAG keyboard accessibility
This commit is contained in:
parent
926c3b4b12
commit
0db213af1c
@ -215,6 +215,16 @@ button {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* Skip-to-content link (keyboard accessibility) */
|
||||
.skip-to-content {
|
||||
position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 9999;
|
||||
}
|
||||
.skip-to-content:focus {
|
||||
position: fixed; top: 8px; left: 8px; width: auto; height: auto;
|
||||
padding: 12px 24px; background: var(--nl-bg-elevated); color: var(--nl-accent);
|
||||
border: 2px solid var(--nl-accent); border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none;
|
||||
}
|
||||
|
||||
/* Respect user motion preference */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
|
||||
@ -29,6 +29,7 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="en" data-theme="dark">
|
||||
<body className={`${spaceGrotesk.variable} ${dmSans.variable} ${ibmPlexMono.variable} antialiased`}>
|
||||
<a href="#main-content" className="skip-to-content">Skip to content</a>
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user