Skip to content

Feature: add a "skip to main content" link and <main> landmark to index.html #745

Description

@yakew7

Where: index.html (nav + page sections), profiler.html (for comparison).

Current gap: index.html is a long single page with a persistent top <nav> followed by many sections (hero, about, projects, explainers, impact, roadmap, FAQ). grep -cn "skip" index.html returns 0 - there is no "Skip to main content" link anywhere - and grep -n "<main" index.html also returns 0: the page has no <main> landmark element at all, unlike profiler.html, which wraps its entire body in <main class="profiler-shell">. Keyboard and screen-reader users on index.html currently have no way to bypass the repeated nav/hamburger-menu markup to reach page content directly, and screen readers have no main landmark to jump to via landmark navigation - both are standard WCAG 2.4.1 (Bypass Blocks) affordances the site's otherwise-careful accessibility work (aria-expanded dropdown/hamburger management, aria-live regions, :focus-visible styling, prefers-reduced-motion handling - all present and correct elsewhere in this same file) hasn't yet covered here.

Repro:

$ grep -cn "skip" index.html
0
$ grep -n "<main" index.html profiler.html
profiler.html:145:  <main class="profiler-shell">
(no match in index.html)

Suggested approach: wrap the page's primary content in a <main id="main"> element, and add a visually-hidden-until-focused <a class="skip-link" href="#main">Skip to main content</a> as the very first focusable element in <body>, styled to become visible on :focus - reuse the existing .sr-only class as a base and override for the focused state.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions