IBMa/equal-access

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

romainmenke opened this issue · 6 comments

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.

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

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

Hi @shunguoy,

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

Hopefully this helps.

thanks, @romainmenke reproducible

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

The issue was fixed in the branch dev-4.x-mergemaster2, the pull request is in #1960