Gamify icon indicating copy to clipboard operation
Gamify copied to clipboard

[Bug]: ELUSoC_2026 — Fix stale /dashboard routes in Navbar and missing aria-expanded on mobile toggle

Open Babin123456 opened this issue 5 months ago • 3 comments

Problem

The Navbar.jsx component contains multiple links that point to the old /dashboard route, which was renamed to /app in the current codebase. Additionally, the mobile hamburger button is missing the aria-expanded attribute, making it inaccessible to screen readers.

Current Behavior

  1. <Link to="/dashboard/profile"> navigates to a non-existent route (the Profile page lives at /app/profile).
  2. <Link to="/dashboard"> in both desktop and mobile menus redirects through a legacy redirect instead of going directly to /app.
  3. The mobile hamburger <button> has aria-label but is missing aria-expanded, so screen readers cannot announce whether the menu is open.
  4. The sidebar collapse toggle <button> has title but is missing aria-label and aria-expanded.

Why This Improvement Is Needed

  • Users clicking "Profile" in the top navbar land on an unknown route (no 404 page — falls through to the landing page redirect).
  • Broken navigation is a user-facing bug affecting all logged-in users.
  • Missing aria-expanded violates WCAG 2.1 Success Criterion 4.1.2 (Name, Role, Value) for interactive controls.

Proposed Solution

  1. Change to="/dashboard/profile" → to="/app/profile" in Navbar.jsx.
  2. Change all to="/dashboard" → to="/app" (desktop and mobile) in Navbar.jsx.
  3. Add aria-expanded={isMobileMenuOpen} and aria-controls="mobile-nav-menu" to the hamburger button.
  4. Add a matching id="mobile-nav-menu" to the mobile menu container.
  5. Add aria-label and aria-expanded to the sidebar collapse toggle in Sidebar.jsx.

Expected Outcome

  • Clicking "Profile" or "Dashboard" in the navbar navigates directly to the correct routes.
  • Screen readers correctly announce the open/closed state of both the mobile menu and sidebar.

Additional Notes

  • No visual changes — this is a pure correctness and accessibility fix.
  • The /dashboard redirect in App.jsx remains in place for legacy bookmarks.

Babin123456 avatar Jun 27 '26 11:06 Babin123456

Thank you for raising this issue!

We'll review it as soon as possible. We truly appreciate your contributions! ✨

Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊

github-actions[bot] avatar Jun 27 '26 11:06 github-actions[bot]

Hi, I'd like to work on this issue. I'll fix the stale /dashboard route links in Navbar.jsx (pointing them to /app) and add the missing aria-expanded/aria-controls attributes to the mobile hamburger and sidebar toggle for accessibility. Could you please assign it to me?

/assign /claim

anshul23102 avatar Jun 29 '26 07:06 anshul23102

Hi,could you assign this issue to me?

Keshavsspppp avatar Jul 03 '26 22:07 Keshavsspppp