Skip to content

a11y: add a "skip to content" link in the base layout #239

Description

@levino

Problem

packages/base/astro/layouts/Page.astro has no skip-to-content link, so keyboard and screen-reader users must tab through the full global navigation on every page before reaching the main content.

Suggested fix

Add a visually-hidden-until-focused skip link as the first focusable element in <body>, targeting the main content wrapper:

<a href="#main-content" class="sr-only focus:not-sr-only focus:absolute focus:z-50 ...">Skip to content</a>
...
<div id="main-content" class="grow"><slot /></div>

DaisyUI/Tailwind already provide the sr-only/focus:not-sr-only utilities. Should be localizable (de/en) via config or a default per-locale string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions