@sa11y/assert
Advanced tools
Comparing version 0.2.8 to 1.0.0
@@ -10,3 +10,3 @@ import { A11yConfig, AxeResults } from '@sa11y/common'; | ||
* @param context - DOM or HTML Node to be tested for accessibility | ||
* @param rules - A11yConfig preset rule to use, defaults to recommended | ||
* @param rules - A11yConfig preset rule to use, defaults to `base` ruleset | ||
* @returns {@link AxeResults} - list of accessibility issues found | ||
@@ -18,3 +18,3 @@ */ | ||
* @param context - DOM or HTML Node to be tested for accessibility | ||
* @param rules - A11yConfig preset rule to use, defaults to recommended | ||
* @param rules - A11yConfig preset rule to use, defaults to `base` ruleset | ||
* @throws error - with the accessibility issues found, does not return any value | ||
@@ -21,0 +21,0 @@ * */ |
@@ -36,7 +36,7 @@ "use strict"; | ||
* @param context - DOM or HTML Node to be tested for accessibility | ||
* @param rules - A11yConfig preset rule to use, defaults to recommended | ||
* @param rules - A11yConfig preset rule to use, defaults to `base` ruleset | ||
* @returns {@link AxeResults} - list of accessibility issues found | ||
*/ | ||
async function getViolationsJSDOM(context = document, rules = preset_rules_1.defaultRuleset) { | ||
return await common_1.getViolations(async () => { | ||
return await (0, common_1.getViolations)(async () => { | ||
const results = await axe.run(context, rules); | ||
@@ -50,3 +50,3 @@ return results.violations; | ||
* @param context - DOM or HTML Node to be tested for accessibility | ||
* @param rules - A11yConfig preset rule to use, defaults to recommended | ||
* @param rules - A11yConfig preset rule to use, defaults to `base` ruleset | ||
* @throws error - with the accessibility issues found, does not return any value | ||
@@ -53,0 +53,0 @@ * */ |
{ | ||
"name": "@sa11y/assert", | ||
"version": "0.2.8", | ||
"version": "1.0.0", | ||
"description": "Provides assertAccessible API to check DOM for accessibility issues", | ||
@@ -24,6 +24,6 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"@sa11y/common": "0.3.5", | ||
"@sa11y/format": "0.4.4", | ||
"@sa11y/preset-rules": "0.3.7", | ||
"axe-core": "4.3.2" | ||
"@sa11y/common": "0.4.0", | ||
"@sa11y/format": "0.5.0", | ||
"@sa11y/preset-rules": "1.0.0", | ||
"axe-core": "4.3.3" | ||
}, | ||
@@ -36,3 +36,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ccd354549699236f4c7617dad260a7115e8b8ed2" | ||
"gitHead": "87f76e0ddfbccfea1de8edee41642da661b9328a" | ||
} |
@@ -23,3 +23,3 @@ # `@sa11y/assert` | ||
// - default document context e.g. JSDOM in Jest | ||
// - recommended ruleset from @sa11y/preset-rules and | ||
// - base ruleset from @sa11y/preset-rules and | ||
// - A11yError.checkAndThrow from @sa11y/format | ||
@@ -26,0 +26,0 @@ await assertAccessible(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7858
0
+ Added@sa11y/common@0.4.0(transitive)
+ Added@sa11y/format@0.5.0(transitive)
+ Added@sa11y/preset-rules@1.0.0(transitive)
+ Addedaxe-core@4.3.3(transitive)
- Removed@sa11y/common@0.3.5(transitive)
- Removed@sa11y/format@0.4.4(transitive)
- Removed@sa11y/preset-rules@0.3.7(transitive)
- Removedaxe-core@4.3.2(transitive)
Updated@sa11y/common@0.4.0
Updated@sa11y/format@0.5.0
Updated@sa11y/preset-rules@1.0.0
Updatedaxe-core@4.3.3