Skip to content

🤖 fix: one main landmark in immersive review and on pages without a workspace - #5999

Merged
ThomasK33 merged 1 commit into
mainfrom
a11y/main-landmark-states-5969
Oct 10, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
a11y/main-landmark-states-5969

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

#5967 gave the workspace page one main landmark, inside the chat pane. Immersive review hides the chat pane, and the pages with no workspace have no chat pane at all, so those layouts had no main landmark. This PR makes the primary view of each of those layouts its main. Every one now has exactly one, and the pages look the same as before.

Fixes #5969

Changes

Each production file changes only its root element from <div> to <main> and adds one comment. Classes and props are unchanged.

Layout Owner of main File
Immersive review ImmersiveReviewView root (portaled into #review-immersive-root) ImmersiveReviewView.tsx
No project or workspace (/) RootRouteShell App.tsx
Project creation page ProjectPage root ProjectPage.tsx
Scratch chat creation page ScratchPage root ScratchPage.tsx
  • While immersive review is open, the chat pane root is hidden, inert and aria-hidden, so its main leaves the accessibility tree. The immersive view is then the page's only main.
  • ImmersiveReviewView's containerRef widens from HTMLDivElement to HTMLElement. It is only used for focus() and querySelector.
  • WorkspaceShell.tsx is not touched.

Validation

  • Test first: 8 new stories in App.seededWorkspaceA11y.stories.tsx cover immersive review and the root, project and scratch pages, each at desktop width and at 390 px (fixed-width wrapper plus globals.viewport, Pixel disabled). Each play asserts exactly one role="main" that contains the layout's content, and contains neither navigation "Projects", nor complementary "Workspace insights", nor contentinfo. On main, all 8 fail with "Unable to find role="main"".
  • Reverting any one of the 4 production files breaks exactly that layout's 2 stories and nothing else.
  • Chromium's accessibility tree: each layout gains exactly one main, and its other landmarks are unchanged.
  • All 8 layouts are pixel-identical to main.
  • Lighthouse 13.5.0 confirms no regression on first-run and the seeded page (Accessibility 100, landmark-one-main passes), but its setup cannot reach the pages this PR fixes, so the stories above are the evidence for the fix.
  • make check-react-compiler reports 23/24 (the 1 known skip is ProjectSidebarInner). ImmersiveReviewView still compiles.
  • The full Storybook suite passes (657 passed, 1 skipped). One earlier full run had a single failure in App/MemoryIntuition (a story these files do not render). That story then passed 3 of 3 runs on its own on this branch and 3 of 3 with main's versions of the 4 files, and two full reruns passed.

Notes

  • The notes sidebar stays inside main in desktop immersive review. Its <aside> (complementary) was a top-level landmark and now sits inside the immersive view's main. ARIA allows a complementary landmark inside main. axe's best-practice rule landmark-complementary-is-top-level flags it.
  • Loading states are out of scope. "Opening workspace..." (App.tsx), and the "Loading workspace..." and "No Workspace Selected" placeholders (WorkspaceShell.tsx) still have no main landmark. 🤖 a11y: main landmark missing in loading and placeholder states #5998 tracks them, after the perf work that edits WorkspaceShell.tsx lands.

Screenshots

These show this branch. They are pixel-identical to main.

Immersive review, 1280 px
Root page, 1280 px
Project creation page, 390 px


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $75.86

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T01:30:05.133779Z 7c8865d PR opened
🔒 Security Review ✅ Completed 2026-10-10T01:30:36.850192Z 7c8865d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 65c6d8b Oct 10, 2026
31 checks passed
@ThomasK33
ThomasK33 deleted the a11y/main-landmark-states-5969 branch October 10, 2026 01:52
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.

🤖 a11y: main landmark missing in immersive review and with no workspace selected

1 participant