question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swap out ally.js for focus-trap-react

See original GitHub issue

Feature 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ricokahlercommented, Jun 19, 2020

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.

1reaction
Timercommented, Jun 22, 2020

Focus trapping is necessary for the DX of the overlay. Can you share more about this error? What specifically is going wrong?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found