dequelabs / react-axe

[DEPRECATED] Accessibility auditing for React.js applications
Other
1.16k stars 45 forks source link

Warnings when used with React.StrictMode #105

Closed anthonyhastings closed 4 years ago

anthonyhastings commented 5 years ago

I'm encountering issues when adding react-axe into a project that has React.StrictMode within it's component tree. The error in particular is:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Provider which renders StrictMode children. Instead, add a ref directly to the element you want to reference.

Regarding usage of findDOMNode: https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage

I noticed that some preliminary work had begun around this issue in https://github.com/dequelabs/react-axe/pull/82 but I didn't see any open issues, and decided to make this one.

mconiglio commented 4 years ago

Any news on this? We are facing this issue as well

ticklemepierce commented 4 years ago

We are also seeing this, though the module seems to be working and logging out a11y violations

zvebbo commented 4 years ago

We also have this problem. As ticklemepierce pointed out, the a11y violations are logged but hey are however drowned out by the findDOMNode warnings. Any idea on how to solve this?

arvigeus commented 4 years ago

Another bump to this thread

straker commented 4 years ago

We have moved this package to be under our axe-core-npm monorepo for easier management. As a result, this repository will be deprecated in the coming weeks.

I have transferred the issue so we can still keep track of it.