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

@sa11y/assert

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sa11y/assert - npm Package Compare versions

Comparing version 0.2.8 to 1.0.0

4

dist/assert.d.ts

@@ -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();

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