"use client"; /** * "Skip to main content" — the first thing a keyboard user reaches on every page. Hidden * until focused. Pages put their content in a
of their own, so the link finds it * when used rather than relying on a fixed id. */ export function SkipLink() { const skip = (e: React.MouseEvent) => { const main = document.querySelector("main"); if (!main) return; e.preventDefault(); if (!main.hasAttribute("tabindex")) main.setAttribute("tabindex", "-1"); main.focus(); main.scrollIntoView(); }; return ( Skip to main content ); }