Increase alfa networkidle timeout from 2s to 6s#4
Open
wittjeff wants to merge 1 commit intojrpool:mainfrom
Open
Increase alfa networkidle timeout from 2s to 6s#4wittjeff wants to merge 1 commit intojrpool:mainfrom
wittjeff wants to merge 1 commit intojrpool:mainfrom
Conversation
Modern websites, particularly those built with frameworks like Wix, continue making network requests well after the initial page load. The 2-second timeout for networkidle is too aggressive and causes the alfa test to fail on these sites, returning 0 results even though the page content is available. Increasing the timeout to 6 seconds provides more time for JavaScript-heavy sites to settle while still maintaining a reasonable upper bound. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
waitForLoadState('networkidle')timeout in the alfa test from 2000ms to 6000msProblem
Modern websites built with JavaScript-heavy frameworks (Wix, React SPAs, etc.) continue making network requests well after the initial page load event. The current 2-second timeout for
networkidleis too aggressive, causing the alfa test to timeout and return 0 results even though the page content is available for testing.Example error from scanning a Wix site:
Solution
Increase the timeout to 6 seconds, which:
domcontentloadeduses 5-6s timeouts)Testing
Tested against Wix sites that previously failed with the 2-second timeout. The alfa test now completes successfully and returns valid accessibility results.