mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Add app-shell heading and skip link (WCAG 2.4.1 / GOV.UK)
This commit is contained in:
+8
-2
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user