🎨 Palette: Add skip-to-content link for keyboard accessibility (#169)

💡 What: Added a "Skip to content" link that is visually hidden by default but appears when focused via keyboard. Pointed it to the main content area using `id="main-content"` and `tabIndex={-1}`.
🎯 Why: Keyboard users and screen readers must otherwise tab through the entire navigation menu on every page load before reaching the actual page content. This is tedious and a poor UX.
📸 Before/After: Before, keyboard focus started on "Home" in the header. After, the first tab press shows the "Skip to content" link at the top left of the screen.
♿ Accessibility: Massively improves WCAG compliance (Bypass Blocks) and keyboard navigation efficiency.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
This commit is contained in:
Ralksta
2026-05-31 10:04:49 +02:00
committed by GitHub
parent 9d2a13c9ab
commit 93ac4d275d
3 changed files with 31 additions and 1 deletions

View File

@@ -7,6 +7,27 @@
@import url('./tokens.css');
/* ── Skip to content link ─────────────────────────── */
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: var(--bg-card);
color: var(--text-primary);
padding: 8px 16px;
z-index: 1000;
transition: top 0.2s ease;
border-bottom-right-radius: var(--radius-sm);
font-family: var(--font-sans);
font-weight: 500;
font-size: 0.85rem;
}
.skip-link:focus {
top: 0;
outline: 2px solid var(--text-primary);
}
/* ── Header / Navigation ──────────────────────────── */
.header {
position: fixed;