fix: redundant mobile menu close logic#992
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe mobile menu button in AppHeader.vue has been simplified. Previously, the button dynamically toggled aria-label and aria-expanded attributes based on menu state, switching between menu and close icons. The updated implementation removes this conditional logic. The button now always displays the menu icon and consistently uses the same aria-label for opening the menu, with showMobileMenu always set to true on click. These changes affect the menu's control flow and accessibility attribute handling. The package.json file has also been modified with 4 lines added and 9 removed. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Description
Refactored the mobile menu trigger in the header to act strictly as an "Open" trigger. Previously, the button attempted to toggle between a hamburger and a close icon. However, because the HeaderMobileMenu overlay covers the header when active, the close icon was invisible/inaccessible, creating redundant logic and potential state confusion.
Changes
i-carbon:menuicon.@clicklogic from a toggle to strictly settingshowMobileMenu = true.aria-labelto always reflect "Open Menu" for better accessibility consistency.Before & After
Screencast.from.05-02-26.12.01.01.PM.IST.webm
Screencast.from.05-02-26.12.04.15.PM.IST.webm