Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Timeout on pages with a lazy loaded iframe #1892

Open
romainmenke opened this issue Apr 11, 2024 · 5 comments
Open

[BUG]: Timeout on pages with a lazy loaded iframe #1892

romainmenke opened this issue Apr 11, 2024 · 5 comments
Labels
node-accessibility-checker Issues in the accessibility-checker component priority-2 (med) reproducible T61 user-reported Issues identified outside of the core team

Comments

@romainmenke
Copy link

Project

accessibility-checker for Node

Browser

Chrome

Operating system

MacOS

Description

I did not expect a timeout.

Instead I got :

Navigation timeout of 30000 ms exceeded http://localhost:8080/bar.html

Steps to reproduce

  1. load the sample HTML
  2. run accessibility-checker
  3. see a timeout 🔥
  4. remove style="display: none;" from the sample html
  5. see a finished run with: 0 of 1 passed.

Sample HTML:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<div style="display: none;">
		<iframe loading="lazy" src="https://example.com/" frameborder="0"></iframe>
	</div>
</body>
</html>

Config

# optional - Specify the rule archive
# Default: latest
# Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids.
# If "latest", will use the latest rule release
# If "versioned" (supported in 3.1.61+), will use the latest rule release at
# the time this version of the tool was released
ruleArchive: latest

# optional - Specify one or many policies to scan.
# i.e. For one policy use policies: IBM_Accessibility
# i.e. Multiple policies: IBM_Accessibility, WCAG_2_1
# Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
policies:
    - IBM_Accessibility
    - WCAG_2_1
    - WCAG_2_2

# optional - Specify one or many violation levels on which to fail the test
#            i.e. If specified violation then the testcase will only fail if
#                 a violation is found during the scan.
# i.e. failLevels: violation
# i.e. failLevels: violation,potential violation or refer to below as a list
# Default: violation, potentialviolation
failLevels:
    - violation
    - potentialviolation

# optional - Specify one or many violation levels that should be reported
#            i.e. If specified violation then in the report it would only contain
#                 results which are level of violation.
# i.e. reportLevels: violation
# Valid values: violation, potentialviolation, recommendation, potentialrecommendation, manual
# Default: violation, potentialviolation
reportLevels:
    - violation
    - potentialviolation
    - recommendation
    - potentialrecommendation
    - manual

# Optional - In which formats should the results be output
# Valid values: json, csv, xlsx, html, disable
# Default: json
outputFormat:
    - json

# Optional - Specify labels that you would like associated to your scan
#
# i.e.
#   label: Firefox,master,V12,Linux
#   label:
#       - Firefox
#       - master
#       - V12
#       - Linux
# Default: N/A
label:
    - foo

# optional - Where the scan results should be saved.
# Default: results
outputFolder: achecker/results

# Optional - Should the timestamp be included in the filename of the reports?
# Default: true
outputFilenameTimestamp: true

# optional - Where the baseline results should be loaded from
# Default: baselines
# baselineFolder: test/baselines

# optional - Where the tool can read/write cached files (ace-node.js / archive.json)
# Default: `${os.tmpdir()}/accessibility-checker/`
# cacheFolder: /tmp/accessibility-checker

I suspect that the checks for iframes wait for these to be loaded, which never happens for lazy iframes that are hidden.

@tombrunet
Copy link
Member

No issue while using the browser extension, so this isn't an engine error.

@tombrunet tombrunet added the node-accessibility-checker Issues in the accessibility-checker component label Apr 11, 2024
@shunguoy
Copy link
Contributor

No issue from the command line either. @romainmenke can you provide the sample code you used to produce the error?

@romainmenke
Copy link
Author

Hi @shunguoy,

I've created a self contained minimal repro here : https://github.com/romainmenke/accessibility-checker-issue-1892

Hopefully this helps.

@shunguoy
Copy link
Contributor

thanks, @romainmenke reproducible

@shunguoy
Copy link
Contributor

shunguoy commented Apr 12, 2024

noticed that with the "visibility:none", the lazy-loading iframe is never loaded.
Related? #1753

@marcjohlic marcjohlic added the user-reported Issues identified outside of the core team label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-accessibility-checker Issues in the accessibility-checker component priority-2 (med) reproducible T61 user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

4 participants