Skip to content

fix: invalid child elements in mobile navigation#7526

Open
AbhiSahane0 wants to merge 2 commits intolayer5io:masterfrom
AbhiSahane0:fix-Mobile-navigation-menu-contains-invalid-nesting
Open

fix: invalid child elements in mobile navigation#7526
AbhiSahane0 wants to merge 2 commits intolayer5io:masterfrom
AbhiSahane0:fix-Mobile-navigation-menu-contains-invalid-nesting

Conversation

@AbhiSahane0
Copy link
Copy Markdown

Description

The mobile navigation menu contains invalid nesting that violates HTML5 specifications. An unordered list (<ul>) can only contain <li>, <script>, or elements as direct children.

There are multiple <a> tags placed as direct children of the <ul> tags rather than being wrapped inside an <li>.

This PR fixes #7484

Notes for Reviewers
Please review the changes

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Abhi <cloudabhi123@gmail.com>
@l5io
Copy link
Copy Markdown
Member

l5io commented Mar 19, 2026

🚀 Preview for commit 7d62fb3 at: https://69bb6a2ba122f1a972e9f1f3--layer5.netlify.app

@l5io
Copy link
Copy Markdown
Member

l5io commented Mar 21, 2026

🚀 Preview for commit 2c2b4bd at: https://69bea934fd19e2c6418ece5d--layer5.netlify.app

@arjunmehta-git
Copy link
Copy Markdown

Good catch on the HTML5 validity issue, @AbhiSahane0. Direct <a> children of <ul> is indeed a spec violation — browsers handle it gracefully but screen readers and accessibility tools may not, and it can affect SEO. Wrapping those anchors in <li> elements is the correct fix.

A few things needed before merge:

  • No review yet — This PR has been open since March 19 without a formal review. Please add it as an agenda item to the next website community meeting so it gets eyes on it.
  • Visual verification — The Netlify preview was generated for an earlier commit. Please confirm the current commit's preview still shows the mobile navigation rendering correctly — all items visible, no layout regressions, and the menu functioning on mobile viewport sizes.
  • Functional test — Navigation changes can hide regressions easily. Please test that every link in the mobile nav still works and that the menu open/close behavior is unaffected.

The change to src/sections/General/Navigation/index.js is focused and the intent is clear. Looking forward to getting a reviewer on this.

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.

Mobile navigation menu contains invalid nesting

4 participants