Description
As I understand it, setAppElement()
is needed so everything in the background, behind the modal, will be set to "hidden" for screen readers. The documentation specifies that setAppElement()
should be applied to a React app (top-level) element.
However, what if we are developing a smaller React app that gets injected to a larger existing (third-party) page that does not use React. How do we make sure the rest of the whole page gets "hidden" when our modal is open? I would think I would just do ReactModal.setAppElement(document.body)
, but I'm not sure if the plugin was designed to handle this.
No errors appear to be thrown, but I don't know if it will actually work because I do not own a Screen Reader. Also could not find anything about this in the docs.