Skip to content

Fix nested <a><button> markup in ErrorPage's CTAs #614

Description

@Abidoyesimze

Summary

ErrorPage wraps Button (which always renders a native ) inside , producing invalid ... nesting used by every error/not-found page in the app. This creates duplicate/ambiguous tab stops and unpredictable screen-reader announcement.

Affected files

  • src/components/ui/ErrorPage.tsx

Tasks

  • Replace the nesting with a single semantic element (an anchor styled as a button, or Button rendering as an anchor via an as/href prop).
  • Verify all consumers (not-found, server-error, onboarding/error, profile/error, dashboard/error, unauthorized, forbidden) render valid markup.

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, bug

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

    Labels

    a11ybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions