-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[material-ui][Chip] Focus issue with Modal/Drawer/Menu #40510
Comments
I assume you're referring to issue #35149. I'll let @siriwatknp decide. |
Thanks for the report and the well-explained repro, @statecs! I think this is a bug, aside from the discussion you mentioned. We currently support this use case, so keyboard navigation should work correctly. The chip should behave the same as the buttons in the example. We'll see what exactly is not working when someone starts working on it, but for now, I'm adding the ready-to-take label. |
@DiegoAndai Can I debug and work on this? |
@jaisaichand sure, let me know if you need help. Thanks. |
Any update? 👍 |
@DiegoAndai Hi Can I work on this? |
Hey @jjisabi, sure! Feel free to work on it. I'll ask you not to open a PR yet, as we're changing to use the @jaisaichand did you ever start working on this? |
Hi @DiegoAndai I have resolved this issue but I'm not opening any PR until |
Hey @shrilsharma, the |
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/mui-chip-focus-bug-c9tlpv
Steps:
Current behavior
After closing the Menu or Drawer, the Chip component loses focus. It briefly shows focus-visible styling, which then disappears. This prevents reactivation of the Chip through the Space key, as it's no longer focused.
Expected behavior
The Chip should regain focus with visible focus highlighting after the Menu or Drawer is closed, allowing users to reopen the Menu/Drawer with the Space key.
Context
This issue is causing unpredictable keyboard behavior in applications that use the Chip component to trigger modals and menus.
Additional Information:
Discussion has been made regarding the implementation of Chip for toggling menus and modals, with comparisons to Google Flights filters and Material Design specifications. The behavior of Chip and Button components in this context is a subject of debate. A workaround has been proposed but leads to a focus trap issue.
Request:
Further investigation and potential implementation of a solution to ensure consistent and accessible behavior of the Chip component when used with Modal, Drawer, or Menu components.
Your environment
npx @mui/envinfo
Search keywords: chip
The text was updated successfully, but these errors were encountered: