Skip to content

fix(a11y): <main> landmark + admin muted-text contrast (item 6)#216

Merged
arigatoexpress merged 1 commit into
mainfrom
fix/p3c-a11y-landmarks
Jun 20, 2026
Merged

fix(a11y): <main> landmark + admin muted-text contrast (item 6)#216
arigatoexpress merged 1 commit into
mainfrom
fix/p3c-a11y-landmarks

Conversation

@arigatoexpress

Copy link
Copy Markdown
Owner

Adds a single <main id=main-content> landmark per page via the one ErrorBoundary every routed page passes through (19 usages, 1/page, never nested — no per-branch edits). Bumps admin-page text-gray-400text-gray-500 on light bg for WCAG AA (matches the customer-page P3b fix). Build OK, vitest 50/50.

- ErrorBoundary now wraps its rendered page in <main id="main-content"> (both the
  normal and error-fallback paths). It is the single component every routed page
  passes through (19 usages, exactly one per page, never nested), so this yields
  one <main> landmark per page from a single edit instead of touching 19 branches.
- Admin pages (AdStudio/DocumentCenter/PhotoManager): text-gray-400 -> text-gray-500
  on light backgrounds for WCAG AA small-text contrast (same fix already applied to
  the customer-facing pages in P3b).

Verified: frontend build OK, vitest 50/50, main-content present in bundle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eebcf6cd1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

return this.props.children;
return <main id="main-content">{this.props.children}</main>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the existing main-content target

Because ErrorBoundary is the root wrapper in frontend/src/main.jsx and is also used around routed pages, this unconditional <main id="main-content"> adds a second main-content id before the chat page's existing skip-link target (frontend/src/App.jsx already has href="#main-content" and a focusable chat <main id="main-content">). In that context the browser resolves the skip link to this outer wrapper, which still contains the nav and is not the intended focus target, and it also creates duplicate IDs/nested main landmarks across normal renders.

Useful? React with 👍 / 👎.

@arigatoexpress arigatoexpress merged commit f9baa96 into main Jun 20, 2026
2 checks passed
@arigatoexpress arigatoexpress deleted the fix/p3c-a11y-landmarks branch June 20, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant