react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

useModalOverlay breaks interaction of external overlay elements

Open smitev opened this issue 3 months ago โ€ข 7 comments

Provide a general summary of the issue here

useModalOverlay sets by default in ariaHideOutside shouldUseInert: true.

That breaks interaction with external overlays not created with react-aria. For example libraries for creating cookie consent dialogs that are loaded before the react-aria dialog.

๐Ÿค” Expected Behavior?

useModalOverlay should be have a prop to disable setting the inert (or aria-hidden) to the other HTML elements in the body.

๐Ÿ˜ฏ Current Behavior

At the moment you can't disable shouldUseInert on the ariaHideOutside used inside useModalOverlay

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

/

Version

/

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS Sequioa

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

smitev avatar Aug 28 '25 10:08 smitev