Skip to content

fix: remove duplicate main landmarks and id='main-content' across pages#1410

Open
mayurigade-hub wants to merge 1 commit into
magic-peach:mainfrom
mayurigade-hub:fix/duplicate-main-content-id
Open

fix: remove duplicate main landmarks and id='main-content' across pages#1410
mayurigade-hub wants to merge 1 commit into
magic-peach:mainfrom
mayurigade-hub:fix/duplicate-main-content-id

Conversation

@mayurigade-hub
Copy link
Copy Markdown

Description

Fixes duplicate id="main-content" values and nested <main> landmark elements that caused invalid HTML and accessibility issues for screen readers and keyboard users.

Root Cause

layout.tsx already renders a single:

<main id="main-content">

that wraps all page content.

However, page.tsx, privacy/page.tsx, and contact/page.tsx were also rendering their own <main> elements, resulting in:

  • Duplicate id="main-content" on the homepage
  • Nested <main> landmarks across pages
  • Invalid HTML structure
  • Accessibility issues for screen readers and keyboard navigation

Changes Made

  • src/app/layout.tsx — No changes required; remains the single source of truth for <main id="main-content">
  • src/app/page.tsx — Removed the duplicate <main id="main-content"> wrapper around <VideoEditor />
  • src/app/privacy/page.tsx — Replaced <main> with <div>
  • src/app/contact/page.tsx — Replaced <main> with <div>

Result

  • Only one id="main-content" exists per page
  • Only one <main> landmark exists per page
  • Skip-link navigation works correctly
  • Improved accessibility and valid HTML structure

Related Issue

Closes #1264


Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

GitHub Username: mayurigade-hub

Contribution Level: Intermediate


Screen Recording

Not required. This is a structural accessibility fix with no visual UI changes.

Verification can be done through browser DevTools by confirming:

  • Only one id="main-content" exists
  • Only one <main> landmark exists per page

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome
  • bun run lint passes
  • bunx tsc --noEmit passes
  • New interactive elements have accessible names where applicable
  • No console.log statements remain
  • This PR is related to a valid issue

- layout.tsx: single <main id='main-content'> wraps all children (no change)
- page.tsx: removed duplicate <main id='main-content'> wrapper around VideoEditor
- privacy/page.tsx: changed <main> to <div> to avoid nested main landmarks
- contact/page.tsx: changed <main> to <div> to avoid nested main landmarks

Fixes duplicate id='main-content' and nested <main> accessibility issues.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@mayurigade-hub is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @mayurigade-hub!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added the gssoc'26 GirlScript Summer of Code 2026 label May 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @mayurigade-hub

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:beginner Beginner level - 20 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GirlScript Summer of Code 2026 level:beginner Beginner level - 20 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Duplicate main-content landmarks cause invalid page structure and accessibility issues

1 participant