Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

accessibility-checker

Package Overview
Dependencies
Maintainers
3
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accessibility-checker - npm Package Compare versions

Comparing version 3.1.38 to 3.1.39

22

lib/ACEngineManager.js

@@ -62,3 +62,9 @@ "use strict";

try {
if ('undefined' === typeof (ace)) {
var ace_backup_in_ibma;
if ('undefined' !== typeof (ace)) {
if (!ace || !ace.Checker)
ace_backup_in_ibma = ace;
ace = null;
}
if ('undefined' === typeof (ace) || ace === null) {
return new Promise(function (resolve, reject) {

@@ -70,2 +76,6 @@ var script = document.createElement('script');

script.addEventListener('load', function () {
globalThis.ace_ibma = ace;
if ('undefined' !== typeof (ace)) {
ace = ace_backup_in_ibma;
}
resolve();

@@ -98,3 +108,3 @@ });

browser = content;
scriptStr = "let cb = arguments[arguments.length - 1];\ntry {\n if ('undefined' === typeof(ace)) {\n let script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('aChecker', 'ACE');\n script.setAttribute('src', '".concat(config.rulePack, "/ace.js');\n script.addEventListener('load', function() {\n cb();\n });\n let heads = document.getElementsByTagName('head');\n if (heads.length > 0) { heads[0].appendChild(script); }\n else { document.body.appendChild(script); }\n } else {\n cb();\n }\n} catch (e) {\n cb(e);\n}\n");
scriptStr = "let cb = arguments[arguments.length - 1];\ntry {\n var ace_backup_in_ibma;\n if ('undefined' !== typeof(ace)) {\n if (!ace || !ace.Checker) \n ace_backup_in_ibma = ace;\n ace = null; \n } \n if ('undefined' === typeof (ace) || ace === null) {\n let script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('aChecker', 'ACE');\n script.setAttribute('src', '".concat(config.rulePack, "/ace.js');\n script.addEventListener('load', function() {\n globalThis.ace_ibma = ace;\n if ('undefined' !== typeof(ace)) {\n ace = ace_backup_in_ibma;\n } \n cb();\n });\n let heads = document.getElementsByTagName('head');\n if (heads.length > 0) { heads[0].appendChild(script); }\n else { document.body.appendChild(script); }\n } else {\n cb();\n }\n} catch (e) {\n cb(e);\n}\n");
manage = browser.manage();

@@ -121,3 +131,3 @@ if (manage.timeouts) {

config.DEBUG && console.log("[INFO] aChecker.loadEngine detected local");
if (ace) {
if (globalThis.ace_ibma) {
return [2 /*return*/, Promise.resolve()];

@@ -141,3 +151,3 @@ }

case 0:
if (ace) {
if (globalThis.ace_ibma) {
return [2 /*return*/, Promise.resolve()];

@@ -166,4 +176,4 @@ }

err && console.log(err);
ace = require("./engine/ace-node");
checker = new ace.Checker();
var ace_ibma = require("./engine/ace-node");
checker = new ace_ibma.Checker();
}

@@ -170,0 +180,0 @@ catch (e) {

@@ -279,3 +279,3 @@ "use strict";

if (!ACEngineManager_1.ACEngineManager.isPuppeteer(parsed)) return [3 /*break*/, 7];
Config.DEBUG && console.log("getComplianceHelper:Puppeteer");
Config.DEBUG && console.log("ACHelper.ts:getComplianceHelper:Puppeteer");
return [4 /*yield*/, getComplianceHelperPuppeteer(label, parsed, curPol)];

@@ -285,7 +285,7 @@ case 6: return [2 /*return*/, _a.sent()];

if (!ACEngineManager_1.ACEngineManager.isPlaywright(parsed)) return [3 /*break*/, 9];
Config.DEBUG && console.log("getComplianceHelper:Playwright");
Config.DEBUG && console.log("ACHelper.ts:getComplianceHelper:Playwright");
return [4 /*yield*/, getComplianceHelperPuppeteer(label, parsed, curPol)];
case 8: return [2 /*return*/, _a.sent()];
case 9:
Config.DEBUG && console.log("getComplianceHelper:Local");
Config.DEBUG && console.log("ACHelper.ts:getComplianceHelper:Local");
return [4 /*yield*/, getComplianceHelperLocal(label, parsed, curPol)];

@@ -307,3 +307,3 @@ case 10: return [2 /*return*/, _a.sent()];

browser = parsed;
scriptStr = "let cb = arguments[arguments.length - 1];\ntry {\nlet policies = ".concat(JSON.stringify(Config.policies), ";\n\nlet checker = new window.ace.Checker();\nlet customRulesets = ").concat(JSON.stringify(ACEngineManager_1.ACEngineManager.customRulesets), ";\ncustomRulesets.forEach((rs) => checker.addRuleset(rs));\nsetTimeout(function() {\n checker.check(document, policies).then(function(report) {\n for (const result of report.results) {\n delete result.node;\n }\n cb(report);\n })\n},0)\n} catch (e) {\ncb(e);\n}");
scriptStr = "let cb = arguments[arguments.length - 1];\ntry {\nlet policies = ".concat(JSON.stringify(Config.policies), ";\n\nlet checker = new window.ace_ibma.Checker();\nlet customRulesets = ").concat(JSON.stringify(ACEngineManager_1.ACEngineManager.customRulesets), ";\ncustomRulesets.forEach((rs) => checker.addRuleset(rs));\nsetTimeout(function() {\n checker.check(document, policies).then(function(report) {\n for (const result of report.results) {\n delete result.node;\n }\n cb(report);\n })\n},0)\n} catch (e) {\ncb(e);\n}");
manage = browser.manage();

@@ -322,3 +322,3 @@ if (manage.timeouts) {

report = ACReportManager_1.ACReportManager.setLevels(report);
getPolicies = "return new window.ace.Checker().rulesetIds;";
getPolicies = "return new window.ace_ibma.Checker().rulesetIds;";
if (!(curPol != null && !checkPolicy)) return [3 /*break*/, 3];

@@ -391,3 +391,4 @@ checkPolicy = true;

var policies = _a.policies, customRulesets = _a.customRulesets;
var checker = new window.ace.Checker();
var checker = new window.ace_ibma.Checker();
console.log("ACHelper.js:getComplianceHelperPuppeteer=", "checker ", checker);
customRulesets.forEach(function (rs) { return checker.addRuleset(rs); });

@@ -411,3 +412,3 @@ return new Promise(function (resolve, reject) {

_b = (_a = ACEngineManager_1.ACEngineManager.customRulesets.map(function (rs) { return rs.id; })).concat;
return [4 /*yield*/, page.evaluate("new window.ace.Checker().rulesetIds")];
return [4 /*yield*/, page.evaluate("new window.ace_ibma.Checker().rulesetIds")];
case 2:

@@ -414,0 +415,0 @@ valPolicies = _b.apply(_a, [_c.sent()]);

@@ -100,3 +100,3 @@ "use strict";

ACReportManager.isLabelUnique = function (label) {
ACReportManager.config.DEBUG && console.log("START 'aChecker.isLabelUnique' function");
ACReportManager.config.DEBUG && console.log("ACReportManager:START 'aChecker.isLabelUnique' function");
// Variable Decleration

@@ -133,3 +133,3 @@ var labelExists = false;

case 0:
ACReportManager.config.DEBUG && console.log("sendResultsToReporter:", ACReportManager.config.outputFormat);
ACReportManager.config.DEBUG && console.log("ACReportManager:sendResultsToReporter:", ACReportManager.config.outputFormat);
if (ACReportManager.config.outputFormat.indexOf("json") != -1) {

@@ -136,0 +136,0 @@ ACReportManager.reporters.json.report(results);

{
"name": "accessibility-checker",
"version": "3.1.38",
"version": "3.1.39",
"description": "An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -402,1 +402,7 @@ # accessibility-checker

If you think you've found a bug, have questions or suggestions, please report the bug in [GitHub Issues](https://github.com/IBMa/equal-access/issues).
## Known issues and workarounds
1. If you see `TypeError: ace.Checker is not a constructor`:
- Try to run your tests serially using the configuration option in your framework. For example, use `--runInBand` in Jest framework.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc