layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

Mobile navigation menu contains invalid nesting

Open leecalcote opened this issue 8 months ago β€’ 8 comments

Description

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

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

Location: Found in the dropdown menus (https://github.com/layer5io/layer5/blob/master/src/sections/General/Navigation/index.js#L344-L345). For example:

<ul>
    <li class="mobile-nav-subitem">...</li>
    <a class="mobile-sub-action-item" href="/pricing"><span class="readmore-btn">Pricing...</span></a>
</ul>

Expected Behavior

Avoid negatively impacting accessibility (screen readers will struggle to count list items) and can cause cross-browser layout inconsistencies.


Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

leecalcote avatar Mar 11 '26 16:03 leecalcote

Hi @leecalcote, I would to work on this bug.

Thanks

AbhiSahane0 avatar Mar 11 '26 16:03 AbhiSahane0

Hi @leecalcote ! I’d like to work on this issue. Could you please assign it to me?

megha1807 avatar Mar 11 '26 17:03 megha1807

@megha1807, you already have a couple of issues assigned. Please complete those before taking new ones.

saurabhraghuvanshii avatar Mar 11 '26 17:03 saurabhraghuvanshii

Thanks @AbhiSahane0

saurabhraghuvanshii avatar Mar 11 '26 17:03 saurabhraghuvanshii

I would like to work on this issue @saurabhraghuvanshii

AyushK5ingh avatar Mar 17 '26 17:03 AyushK5ingh

@AbhiSahane0 any progress.

saurabhraghuvanshii avatar Mar 18 '26 13:03 saurabhraghuvanshii

Yah I will raise a another PR with fixes tomorrow.

Thanks

AbhiSahane0 avatar Mar 18 '26 13:03 AbhiSahane0

Hi @leecalcote, @saurabhraghuvanshii I have Opened PR #7526 for this issue Please review it

Thanks

AbhiSahane0 avatar Mar 21 '26 03:03 AbhiSahane0