fix(a11y): remove nested <main> landmarks under (home) layout#1237
Merged
MODSetter merged 1 commit intoMODSetter:devfrom Apr 16, 2026
Merged
fix(a11y): remove nested <main> landmarks under (home) layout#1237MODSetter merged 1 commit intoMODSetter:devfrom
MODSetter merged 1 commit intoMODSetter:devfrom
Conversation
The (home)/layout.tsx already wraps children in <main>. Having another <main> inside each child page produces nested landmarks, which is invalid HTML and confuses screen readers. Changed the outermost wrapper from <main> → <div> in: - surfsense_web/app/(home)/page.tsx (homepage) - surfsense_web/app/(home)/free/page.tsx (free AI chat landing) Other (home) descendants (login/register/privacy/terms/changelog/ announcements/blog/contact/free/[model_slug]) were already using <div>. Closes MODSetter#1191
|
@xr843 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 4e68565..3f85f2a
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (2)
• surfsense_web/app/(home)/free/page.tsx
• surfsense_web/app/(home)/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1191.
Summary
The
(home)/layout.tsxalready wraps every child page in<main>. Two pages also wrapped their own content in<main>, producing nested landmarks — invalid HTML that confuses screen readers / assistive tech.Swapped the outermost wrapper from
<main>→<div>in:surfsense_web/app/(home)/page.tsx(homepage)surfsense_web/app/(home)/free/page.tsx(free AI chat landing)Pure structural tag change, no styling or behavior touched.
Other pages in
(home)checkedScanned all descendants of
surfsense_web/app/(home)/for<main>:login/page.tsx— already<div>register/page.tsx— already<div>privacy/page.tsx,terms/page.tsx,changelog/page.tsx,announcements/page.tsx,blog/page.tsx,blog/[slug]/page.tsx,contact/page.tsx,free/[model_slug]/page.tsx— all already<div>or no top-level landmarkOnly the 2 files above were still using
<main>.Test plan
grep -r '<main' surfsense_web/app/(home)/returns zero matches post-edit<main>(the one from layout.tsx)<main>landmarks" warning should be gone🤖 Generated with Claude Code
High-level PR Summary
This PR fixes an accessibility issue by removing nested
<main>landmarks from two pages under the(home)layout. Since the layout already wraps all child pages in a<main>tag, the homepage and free AI chat landing page had redundant<main>elements that were replaced with<div>tags. This change eliminates invalid HTML structure that can confuse screen readers and assistive technologies, while maintaining all existing styling and behavior.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_web/app/(home)/page.tsxsurfsense_web/app/(home)/free/page.tsx