Skip to content

Add accessibility baseline: skip link, focus styles, nav label #6

Open

Description

@eleshar

Scope

The theme ships no accessibility baseline. parts/header.html and parts/footer.html use correct landmark elements, but there is no skip link, no navigation label and no focus styling. Because every client theme starts from this markup, the gap is systemic and is rarely retrofitted after launch.

Add:

  • A skip-to-content link as the first focusable element, visually hidden until focused, targeting the main content landmark.
  • An aria-label on the navigation block in parts/header.html.
  • Visible :focus-visible styling defined through theme.json styles (elements.link, button and input focus states) rather than a new stylesheet, so the zero-render-blocking-CSS path is preserved.
  • A main landmark wrapping post content in the templates, where not already present.

Do not introduce a custom stylesheet or JavaScript for this.

Acceptance criteria

  • Tabbing from page load reveals the skip link as the first stop; activating it moves focus to the main content.
  • Every interactive element has a visible focus indicator meeting WCAG 2.2 AA non-text contrast.
  • Navigation is announced with a distinct accessible name.
  • Each template exposes exactly one main landmark.
  • An axe or pa11y run against a scaffolded install reports no violations on the front page, a single post and a 404.
  • Theme still ships zero render-blocking CSS; no new stylesheet or script added.

Activity

  1. added
    area:themeTheme & styles (templates, template parts, FSE)
    status:needs-devAnything that needs development.
    on Jul 29, 2026
  2. KhyFee commented on Aug 11, 2026

    @KhyFee

    For a WordPress starter baseline I'd ship:

    1. Skip link in header.php → #main (visible on focus only)
    2. :focus-visible styles on interactive elements (don't disable outline globally)
    3. �ria-label on the primary
      av (�ria-label="Primary" or similar)
    4. One landmark main wrapping he_content area

    That covers the common checklist without a heavyweight a11y library. I can PR those four if you want them broken out separately.

  3. KhyFee commented on Aug 11, 2026

    @KhyFee

    PR open: #9

    Shipped skip link + #main-content on the index main landmark and focus styling. Happy to extend the main id to other templates and add an explicit nav aria-label next if you want the full #6 checklist in one go.

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

    area:themeTheme & styles (templates, template parts, FSE)priority:importantHigh impact; schedule next.status:needs-devAnything that needs development.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions