cloudflare / cloudflare/react-modal2
Opt-in auto fucus
Open
- Dominant language
- JavaScript
- Stars
- 275
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Current solution when modal automatically searches for tabbable element on open sometimes leads to not desired behavior.
For instance there is a bunch of links inside modal and action button in the end. I don't want to first link be highlighted when user opens a modal.
I think any tabbable element should not be focused by default, default should be focusing on modal div itself with tabIndex='-1' (a11y-focus-scope does it now only if tabbable element can't be found).
And if you want to focus some element, then set option on react-modal2 to enable current mechanic of searching first tabbable element.
Contributor guide
Assessment
This issue has not been assessed yet.