dequelabs / react-axe

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

fix: Fire debounced checkNode on leading edge #147

Closed JiaboHou closed 4 years ago

JiaboHou commented 4 years ago

Taken from @dambusm's fork

This PR fixes issues with checking unmounted nodes and the resulting console errors.

Example console error: image

Closes issue: #144

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

straker commented 4 years ago

Thanks for the pr. @dambusm have you noticed any issues with firing on the leading edge? Does getting the results first, but not again until the end of the debounce timer cause any confusion?

will-ks commented 4 years ago

Thanks for the pr. @dambusm have you noticed any issues with firing on the leading edge? Does getting the results first, but not again until the end of the debounce timer cause any confusion?

I'm afraid I haven't had time to test it properly so far, hence not submitting it as a PR myself. I am going to try and grab some time today to play around with it some more and write up some tests.

straker commented 4 years ago

@dambusm any update? If not I think I'm going to merge the pr by end of day.

will-ks commented 4 years ago

I wasn't able to write any tests unfortunately, but I've been using a build with this change on my production project and haven't noticed any ill effects, and the console errors are definitely gone.