Open
Description
Component
Dialog
Package version
9.0.0
React version
18
Environment
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
npmPackages:
@fluentui/react-components: ^9.0.0 => 9.61.4
@types/react: ^17 => 17.0.85
@types/react-dom: ^17 => 17.0.26
react: ^18 => 18.3.1
react-dom: ^18 => 18.3.1
Current Behavior
Tabbing is not trapped inside of the dialog, which is opened from within Menu component.
Expected Behavior
Tabbing should be trapped inside of the modal dialog. Dialog has explicitly set modalType="modal", which has the description: "The tab sequence is kept within the dialog". This is not happenning
Reproduction
https://stackblitz.com/edit/csmohdj7-nf3deanr?file=src%2Fexample.tsx
Steps to reproduce
- Open: https://stackblitz.com/edit/csmohdj7-nf3deanr?file=src%2Fexample.tsx
- Click Trigger menu
- Click Dialog trigger
- Try to Tab.
- Focus goes outside of dialog..
Are you reporting an Accessibility issue?
yes
Suggested severity
High - No workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.The provided reproduction is a minimal reproducible example of the bug.
Activity
Dejvovo commentedon Mar 27, 2025
Workaround: Put dialog outside of the menu popover. https://stackblitz.com/edit/csmohdj7-qajzfjd3?file=src%2Fexample.tsx
sopranopillow commentedon Apr 5, 2025
I see it reproing, seems like a tabster related issue(?)
Dejvovo commentedon Apr 7, 2025
Ye, definitely seems like a tabster issue.
Problem is, i can't override this behaviour with my own javascript, because tabster eats the tab in the root and calls e.preventDefault()
khmakoto commentedon Apr 25, 2025
A workaround for now while we investigate is to stop propagation at the
DialogSurface
levelhttps://stackblitz.com/edit/csmohdj7-ln3mk5tv?file=src%2Fexample.tsx