Skip to content

Fix/navbar dark class focus trap#50

Merged
SatyamPandey-07 merged 2 commits into
harshika53:mainfrom
OmanshiRaj:fix/navbar-dark-class-focus-trap
Jul 5, 2026
Merged

Fix/navbar dark class focus trap#50
SatyamPandey-07 merged 2 commits into
harshika53:mainfrom
OmanshiRaj:fix/navbar-dark-class-focus-trap

Conversation

@OmanshiRaj

Copy link
Copy Markdown
Contributor

fixes #48
The

in Navbar.tsx had two conflicting dark:bg-* utility classes (dark:bg-gray-800/95 and dark:bg-gray-900/95) on the same element — leftover from an incomplete edit, with Tailwind silently applying only the later one. Removed the dead dark:bg-gray-800/95 class, keeping dark:bg-gray-900/95. Separately, the mobile menu (#mobile-menu) closed on Escape and outside click but didn't trap Tab focus, so keyboard users could tab out of the open menu into content hidden behind the overlay. Extended the existing keydown effect to also handle Tab/Shift+Tab, cycling focus between the first and last focusable elements inside the menu, and moved initial focus into the menu when it opens. Both changes are contained to src/components/Navbar.tsx; no other files were touched.

@SatyamPandey-07
SatyamPandey-07 merged commit 222ff8b into harshika53:main Jul 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Navbar header has duplicate conflicting dark-mode background class, and mobile menu lacks focus trap

2 participants