New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: collapse sidenav menus when side nav is closed #16096
fix: collapse sidenav menus when side nav is closed #16096
Conversation
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally display: none
can't be used because it removes the element(s) from the accessibility tree and so it won't be read by screenreaders.
Instead of a style-related fix, would it make sense to modify the internal state of SideNavMenu to account for the change in the parent SideNav?
This bug was introduced #15349, my guess is the fix for this would be something similar to what was removed, but without reintroducing the bug it was fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
0619707
…stem#16096) * fix: collapse sidenav menus when side nav is closed * fix: sidenav collapse issues * Update packages/react/src/components/UIShell/SideNavMenu.tsx * Update packages/react/src/components/UIShell/SideNavMenu.tsx --------- Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Closes #15900
Submenus should close when side nav closes
Changelog
Changed
Testing / Reviewing
Go to storybook , Open Side Nav -> Open Submenu -> Close side nav , sub menu should collapse autromatically.