Improve accessibility in the navigation bar; direct child of rendered <ul> element are now only <li> elements.
This commit is contained in:
parent
a97d64ded5
commit
a354ae5de0
1 changed files with 23 additions and 19 deletions
|
@ -28,9 +28,12 @@ const Navbar = () => {
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
||||||
{/* Mobile view */}
|
{/* Mobile view */}
|
||||||
|
<NavigationMenuItem className="flex md:hidden">
|
||||||
<MobileNav />
|
<MobileNav />
|
||||||
|
</NavigationMenuItem>
|
||||||
|
|
||||||
{/* Desktop Menu */}
|
{/* Desktop Menu */}
|
||||||
|
<NavigationMenuItem className="hidden md:flex">
|
||||||
<nav className="hidden md:flex gap-4">
|
<nav className="hidden md:flex gap-4">
|
||||||
{NAVBAR.centerLinks?.map(({ href, label, target }) => (
|
{NAVBAR.centerLinks?.map(({ href, label, target }) => (
|
||||||
<Link
|
<Link
|
||||||
|
@ -47,8 +50,9 @@ const Navbar = () => {
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
|
</NavigationMenuItem>
|
||||||
|
|
||||||
<div className="hidden md:flex gap-2 items-center">
|
<NavigationMenuItem className="hidden md:flex gap-2 items-center">
|
||||||
{NAVBAR.rightLinks?.map(({ href = "", label, target }) => (
|
{NAVBAR.rightLinks?.map(({ href = "", label, target }) => (
|
||||||
<Link
|
<Link
|
||||||
key={label}
|
key={label}
|
||||||
|
@ -75,7 +79,7 @@ const Navbar = () => {
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
</div>
|
</NavigationMenuItem>
|
||||||
</NavigationMenuList>
|
</NavigationMenuList>
|
||||||
</NavigationMenu>
|
</NavigationMenu>
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Reference in a new issue