Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion accessibility-checker-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "SEE LICENSE IN LICENSE from the 'equal-access' repository",
"overrides": {
"diff": "^8.0.3",
"js-yaml": "^4.3.2",
"js-yaml": "^5.4.1",
"mocha": {
"minimatch": "^5.1.6"
},
Expand Down
46 changes: 23 additions & 23 deletions accessibility-checker-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions accessibility-checker-extension/test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion accessibility-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"adm-zip": "^0.6.0",
"chromedriver": "*",
"js-yaml": "^4.2.0",
"js-yaml": "^5.4.1",
"microdiff": "^1.5.0",
"puppeteer": "^25.1.0",
"write-excel-file": "^4.1.1"
Expand Down
2 changes: 1 addition & 1 deletion accessibility-checker/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@ibm/telemetry-js": "^1.9.1",
"chromedriver": "*",
"js-yaml": "^4.2.0",
"js-yaml": "^5.4.1",
"microdiff": "^1.5.0",
"puppeteer": "^25.1.0",
"write-excel-file": "^4.1.1"
Expand Down
28 changes: 20 additions & 8 deletions accessibility-checker/test-act-w3/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,27 @@ import * as fs from "fs";
}
} else if (testcase.relativePath) {
// W3C testcase files: served from the pre-fetched in-memory cache.
// If the HTML references external sub-resources (iframe src, img src, etc.)
// pass the canonical URL as the base and wait for networkidle2 so those
// loads settle. Otherwise domcontentloaded is enough and much faster.
// Use networkidle2 when the page has sub-resources that need to load:
// - absolute http(s) src/data attributes
// - iframe src (relative or absolute) — the checker scans iframe content
// href is never fetched on load (<a> links), so it is excluded.
// Cap networkidle2 at 10 s so a stalled resource never blocks the run.
const html = htmlCache.get(testcase.relativePath) || "";
const hasExternalRefs = /\s(?:src|href|data)\s*=\s*["'][^"'#]/i.test(html);
await pupPage.setContent(html, {
waitUntil: hasExternalRefs ? 'networkidle2' : 'domcontentloaded',
...(hasExternalRefs ? { url: testcase.url } : {})
});
const hasExternalRefs = /\s(?:src|data)\s*=\s*["']https?:\/\//i.test(html)
|| /<iframe[^>]+src\s*=\s*["'][^"']/i.test(html);
try {
await pupPage.setContent(html, {
waitUntil: hasExternalRefs ? 'networkidle2' : 'domcontentloaded',
timeout: hasExternalRefs ? 10000 : 30000,
...(hasExternalRefs ? { url: testcase.url } : {})
});
} catch (err) {
if (err.name === 'TimeoutError') {
// Page partially loaded; continue with whatever is in the DOM
} else {
throw err;
}
}
} else {
await pupPage.goto(testcase.url, { waitUntil: 'networkidle2' });
}
Expand Down
16 changes: 8 additions & 8 deletions common/module/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"typescript": "^5.1.3"
},
"dependencies": {
"adm-zip": "^0.5.9",
"adm-zip": "^0.6.0",
"microdiff": "^1.5.0",
"write-excel-file": "^4.1.1"
}
Expand Down
2 changes: 1 addition & 1 deletion common/module/src/config/ACConfigManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ async function loadConfigFromYAMLorJSONFile() {
ACConstants.DEBUG && console.log("Loading as YAML file.");

// Load in as yml or yaml file and return this object
return YAML.load(fs.readFileSync(fileToCheck), 'utf8');
return YAML.load(fs.readFileSync(fileToCheck, 'utf8'));
}
} else if (fileExtension === "mjs") {
// ES module config file — use dynamic import() directly (require() unavailable in ESM contexts)
Expand Down
18 changes: 9 additions & 9 deletions cypress-accessibility-checker/boilerplates/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading