Mobiel menu als donker overlay zonder de pagina te verschuiven, sticky balk onder sm, skiplink, focusring en h1 met screenreader-tekst

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 15:22:26 +01:00
co-authored by Claude Sonnet 5.5
parent aa843a5675
commit 1756ab1eb0
11 changed files with 114 additions and 8 deletions
+22
View File
@@ -0,0 +1,22 @@
/**
* "Naar de inhoud" link for keyboard and screen-reader users (WCAG 2.4.1). Hidden until focused.
* Handled in script because the app uses hash routing (a plain #main anchor would be taken by the
* router, see utils/scrollToHash).
*/
export function SkipLink() {
return (
<a
href="#main"
onClick={(event) => {
event.preventDefault();
const main = document.getElementById('main');
main?.focus();
main?.scrollIntoView({ block: 'start' });
}}
className="sr-only z-50 bg-white px-4 py-3 text-base font-bold text-[#0e0d0d] focus:not-sr-only focus:fixed focus:left-4 focus:top-4"
data-testid="skip-link"
>
Naar de inhoud
</a>
);
}