davidtheclark / react-aria-modal

A fully accessible React modal built according WAI-ARIA Authoring Practices
http://davidtheclark.github.io/react-aria-modal/demo/
MIT License
1.03k stars 96 forks source link

React 16.9+ failures: `initialFocus` refers to no known node #96

Open wldcordeiro opened 4 years ago

wldcordeiro commented 4 years ago

I've run into issues when updating to latest React where that error is thrown, primarily in test environments. It appears like we're checking for the initialFocus before it has rendered though when I run debug() in react-testing-library.

Working on getting a minimal reproduction case.

toolness commented 4 years ago

Ah I ran into this as well! I think it's actually reported in one of this library's dependencies at https://github.com/davidtheclark/focus-trap-react/issues/24. About a year ago, I documented my findings in a comment at https://github.com/davidtheclark/focus-trap-react/issues/24#issuecomment-431424268.