Skip to content

Give the new error boundary pages a focus target matching the app's route-change pattern #615

Description

@Abidoyesimze

Summary

onboarding/error.tsx, profile/error.tsx, and (errors)/server-error/page.tsx render ErrorPage inside a plain div with no id/tabIndex. The app's DashboardShell moves focus to #main-content on every pathname change, but these routes sit outside that route group and never get it — the header's skip-link also resolves to nothing on these pages.

Affected files

  • src/app/onboarding/error.tsx
  • src/app/profile/error.tsx
  • src/app/(errors)/server-error/page.tsx
  • src/components/ui/ErrorPage.tsx

Tasks

  • Give ErrorPage's wrapper the MAIN_CONTENT_LANDMARK_ID id (or an equivalent) and move focus to it on mount.
  • Verify the header's skip-to-main-content link resolves correctly on these three routes.

Acceptance criteria

  • Scope is limited to the files listed (or agreed alternatives in the PR).
  • Change is verifiable: tests, screenshots, or written QA steps in the PR.
  • No behavior regressions in related user flows.
  • No new duplicate abstractions without a one-line rationale in the PR.

Suggested labels

a11y, routing

Notes

Sourced from the 2026-07-25 round-2 follow-up audit of the frontend codebase at commit 779e531, run after the first 60-issue audit batch (#525-#584) was substantially resolved. Verified against current file content at time of writing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions