Skip to content

fix(home): keep a single main landmark on the homepage - #104

Merged
nibzard merged 1 commit into
mainfrom
fix/home-single-main-landmark
Jul 31, 2026
Merged

fix(home): keep a single main landmark on the homepage#104
nibzard merged 1 commit into
mainfrom
fix/home-single-main-landmark

Conversation

@nibzard

@nibzard nibzard commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The homepage renders through DocsLayout, which already provides the main#nd-docs-layout landmark. The page-level <main> in app/(home)/_pages/page.en.tsx created a nested duplicate main landmark, which is invalid HTML and confuses assistive tech.
  • Swapped the inner wrapper to a div, keeping the className unchanged, so the layout's main remains the single landmark. PR fix(home): improve homepage semantics #98 fixed the heading semantics but missed this.
  • app/(home)/_pages/ has no other page variants, so this is the only page-level fix needed.

Test plan

  • Added an assertion to the homepage semantics e2e test that the rendered homepage contains exactly one <main element. Verified it fails on the old markup (2 matches) and passes with the fix.
  • bun test tests/e2e/llm-endpoints.test.ts: 22 pass, 0 fail.
  • bun run check and bun run typecheck: clean.

The homepage renders inside DocsLayout, which already provides the
main#nd-docs-layout landmark, so the page-level main created a nested
duplicate. Swap the inner wrapper to a div and assert in the homepage
e2e test that exactly one main element is rendered.
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 31, 2026 12:35pm

Request Review

@nibzard
nibzard merged commit b25f575 into main Jul 31, 2026
3 checks passed
@nibzard
nibzard deleted the fix/home-single-main-landmark branch July 31, 2026 12:48
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