@sa11y/jest 6.3.2 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automatic.d.ts.map +1 -1
- package/dist/automatic.js +4 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +2 -0
- package/package.json +7 -7
package/dist/automatic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAI7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAcF,eAAO,MAAM,2BAA2B,aAAc,MAAM,GAAG,IAAI,SAElE,CAAC;AAEF,eAAO,MAAM,2BAA2B,qBAEvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAUtF;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,aAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAI7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAcF,eAAO,MAAM,2BAA2B,aAAc,MAAM,GAAG,IAAI,SAElE,CAAC;AAEF,eAAO,MAAM,2BAA2B,qBAEvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAUtF;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,aAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkD9F;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,aAAoC,GAAG,IAAI,CAQ7F"}
|
package/dist/automatic.js
CHANGED
|
@@ -57,7 +57,7 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
57
57
|
(0, common_1.log)('Skipping automatic accessibility check as Jest fake timer is in use.');
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
let violations = [];
|
|
61
61
|
const currentDocumentHtml = document.body.innerHTML;
|
|
62
62
|
if (originalDocumentBodyHtml) {
|
|
63
63
|
document.body.innerHTML = originalDocumentBodyHtml;
|
|
@@ -90,6 +90,9 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
90
90
|
// TODO (spike): Disable stack trace for automatic checks.
|
|
91
91
|
// Will this affect all errors globally?
|
|
92
92
|
// Error.stackTraceLimit = 0;
|
|
93
|
+
if (process.env.SELECTOR_FILTER_KEYWORDS) {
|
|
94
|
+
violations = (0, format_1.exceptionListFilterSelectorKeywords)(violations, process.env.SELECTOR_FILTER_KEYWORDS.split(','));
|
|
95
|
+
}
|
|
93
96
|
format_1.A11yError.checkAndThrow(violations, { deduplicate: opts.consolidateResults });
|
|
94
97
|
}
|
|
95
98
|
}
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAwB,MAAM,eAAe,CAAC;AACjE,OAAO,EACH,aAAa,EAIhB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,aAAa,UAiBzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,aAAa,EAAE,aAAa,CAAC;CAKhC,CAAC;AAkCF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,GAAE,SAA4B,GAAG,IAAI,CA4C9D;AACD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAU3C;AACD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAwB,MAAM,eAAe,CAAC;AACjE,OAAO,EACH,aAAa,EAIhB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,aAAa,UAiBzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,aAAa,EAAE,aAAa,CAAC;CAKhC,CAAC;AAkCF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,GAAE,SAA4B,GAAG,IAAI,CA4C9D;AACD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAU3C;AACD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,UAAU,CAKhG;AACD,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,WAAgB,GAAG,UAAU,CAM3F"}
|
package/dist/setup.js
CHANGED
|
@@ -124,6 +124,7 @@ exports.registerSa11yMatcher = registerSa11yMatcher;
|
|
|
124
124
|
function adaptA11yConfigCustomRules(config, customRules) {
|
|
125
125
|
const adaptedConfig = JSON.parse(JSON.stringify(config));
|
|
126
126
|
adaptedConfig.runOnly.values = customRules;
|
|
127
|
+
adaptedConfig.ancestry = true;
|
|
127
128
|
return adaptedConfig;
|
|
128
129
|
}
|
|
129
130
|
exports.adaptA11yConfigCustomRules = adaptA11yConfigCustomRules;
|
|
@@ -131,6 +132,7 @@ function adaptA11yConfig(config, filterRules = exports.disabledRules) {
|
|
|
131
132
|
// TODO (refactor): Move into preset-rules pkg as a generic rules filter util
|
|
132
133
|
const adaptedConfig = JSON.parse(JSON.stringify(config));
|
|
133
134
|
adaptedConfig.runOnly.values = config.runOnly.values.filter((rule) => !filterRules.includes(rule));
|
|
135
|
+
adaptedConfig.ancestry = true;
|
|
134
136
|
return adaptedConfig;
|
|
135
137
|
}
|
|
136
138
|
exports.adaptA11yConfig = adaptA11yConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sa11y/jest",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "Accessibility testing matcher for Jest",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"homepage": "https://github.com/salesforce/sa11y/tree/master/packages/jest#readme",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@jest/test-result": "^27",
|
|
27
|
-
"@sa11y/assert": "6.
|
|
28
|
-
"@sa11y/format": "6.
|
|
29
|
-
"@sa11y/preset-rules": "6.
|
|
27
|
+
"@sa11y/assert": "6.5.0",
|
|
28
|
+
"@sa11y/format": "6.5.0",
|
|
29
|
+
"@sa11y/preset-rules": "6.5.0",
|
|
30
30
|
"jest-matcher-utils": "^27"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@jest/globals": "28.1.3",
|
|
37
|
-
"@sa11y/common": "6.
|
|
38
|
-
"@sa11y/test-utils": "6.
|
|
37
|
+
"@sa11y/common": "6.5.0",
|
|
38
|
+
"@sa11y/test-utils": "6.5.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": "^16 || ^18"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "987dfd0ab61b9d197959d0073f3fe02d5130cc89"
|
|
47
47
|
}
|