fix(web): add skip-to-content link for WCAG keyboard accessibility
This commit is contained in:
parent
2d0a47be92
commit
c2db021568
@ -186,6 +186,16 @@ body {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* 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(--cm-surface-elevated); color: var(--cm-accent);
|
||||
border: 2px solid var(--cm-accent); border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none;
|
||||
}
|
||||
|
||||
/* Respect user motion preference */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
|
||||
@ -55,6 +55,7 @@ export default function RootLayout({
|
||||
<body
|
||||
className={`${inter.variable} ${jetbrainsMono.variable} antialiased`}
|
||||
>
|
||||
<a href="#main-content" className="skip-to-content">Skip to content</a>
|
||||
<Providers>
|
||||
{children}
|
||||
<ToastContainer />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user