Swap out ally.js for focus-trap-react
See original GitHub issueFeature request
Is your feature request related to a problem? Please describe.
In the discussions, a few of us have noticed some issues with the ally.js package that’s imported in @next/react-dev-overlay
.
I’m wondering if you’d be willing to swap our ally.js for focus-trap-react
. It appears the only place where ally.js is used is in the @next/react-dev-overlay
and in that package, ally.js is only being used to trap focus.
Describe the solution you’d like
…It seems like focus-trap-react
is more focused 😅
Its bundle size is much smaller too vs ally.js
Describe alternatives you’ve considered
There may be other libs I haven’t considered but this one seems the most popular.
Additional context
If you’re accepting, I’d be willing to throw this together — at least to experiment.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ally.maintain.disabled
ally.maintain.disabled. Disables any type of user interaction - including the ability to focus elements - essentially rendering elements inert.
Read more >focus-trap-react demo
A demo of focus-trap-react. ... This focus trap will fade in when activated and fade out when deactivated. It logs a message to...
Read more >How To Build a Modal
Stacking contexts are treated atomically as a single unit in the parent stacking context. So how would knowing about these concepts work out...
Read more >Index of /repositories/external-npm
ally.js/, Thu Apr 15 09:19:04 EDT 2021 ... change-emitter/, Thu Feb 10 11:16:18 EST 2022 ... focus-trap-react/, Fri Apr 08 13:57:37 EDT 2022....
Read more >Index of npm-remote-cache/.npm - maven.forgerock.org
11-08-20 02:22:36 -0700. ally.js/. 24-02-21 01:39:33 -0800. almond/. 07-07-20 02:52:16 -0700 ... cache-swap/. 20-02-21 01:27:29 -0800 ... focus-trap-react/.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another idea could be just removing the focus trap feature all together. When the development overlay modal opens, we could just focus it without trapping.
Focus trapping is necessary for the DX of the overlay. Can you share more about this error? What specifically is going wrong?