Add app-shell heading and skip link (WCAG 2.4.1 / GOV.UK)

This commit is contained in:
2026-06-05 12:58:54 +03:00
parent 38c2ac15c2
commit 109c33e2cd
2 changed files with 35 additions and 2 deletions
+8 -2
View File
@@ -23,14 +23,20 @@ export function App() {
return (
<div className={styles.app}>
{/* Skip link (WCAG 2.4.1 / GOV.UK): the first focusable element, hidden
until focused, lets keyboard users bypass the header into the work area. */}
<a className={styles.skipLink} href="#main">
Skip to content
</a>
<header className={styles.header}>
<span className={styles.title}>Astrolabe</span>
<h1 className={styles.title}>Astrolabe</h1>
<span className={styles.version}>v{__APP_VERSION__}</span>
<span className={styles.spacer} />
<ThemeToggle />
</header>
<main className={styles.panes}>
{/* tabIndex -1 makes the landmark a focus target for the skip link. */}
<main id="main" className={styles.panes} tabIndex={-1}>
<section
id="pane-library"
className={styles.pane}