Closed reintroducing closed 4 years ago
I believe the 3rd parameter is a debounce delay that prevents multiple updates of the component from triggering multiple axe calls. So it won't wait 5 seconds to start analyzing. You'll probably need to wait for the API calls to settle before you initialize axe
on the page.
@straker Got it, so that would work for initial page load, but how about when navigating around the site? subsequent pages also load APIs and axe is evaluating the loading state of the pages before the API calls come back.
Excellent question. I'm not sure on that one. I'll try to find an answer and get back to you
Really appreciate your quick responses and help on this.
@straker did you find an answer for this? It looks like we're running into the same issue.
I have not yet. We're preparing for a few huge releases and haven't been able to get to this yet. I'll try to bring this up again after the releases go out.
This would be incredibly helpful, I'm struggling with issues with fade-ins and waiting on rendering components.
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.
I was under the impression that if I did this:
axe(React, ReactDOM, 5000);
axe wont execute until 5 seconds in. I'm basically trying to delay execution because axe is running before my page (with API calls) fully renders and I'm seeing issues that don't really exist once the API calls are finished and I render the page successfully with all elements. Am I misunderstanding that third parameter? How can I delay execution until a certain time (or ideally, it would plug in to some kind of event that I can fire and only execute then, but that may be out of the scope of this package)?