Socket
Socket
Sign inDemoInstall

@sa11y/preset-rules

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sa11y/preset-rules - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

dist/rules.js

@@ -23,3 +23,4 @@ "use strict";

const priority = priorityEnv && exports.priorities.includes(priorityEnv) ? priorityEnv : '';
(0, common_1.log)(`Setting Sa11y rules priority to ${priority}`);
if (priority)
(0, common_1.log)(`Setting Sa11y rules priority to ${priority}`);
return priority;

@@ -26,0 +27,0 @@ }

@@ -17,3 +17,3 @@ import { Priority, WcagLevel, WcagVersion } from './rules';

/**
* Return formatted string containing WCAG version, level and SC
* Return formatted string containing WCAG SC and Priority
*/

@@ -20,0 +20,0 @@ toString(): string;

@@ -24,3 +24,2 @@ "use strict";

if (ruleInfo) {
// TODO: add tests for codecov
// rule has metadata provided in preset-rules

@@ -33,2 +32,4 @@ this.wcagVersion = rules_1.defaultWcagVersion;

}
// TODO (refactor): Is the following required anymore?
// Cleanup taking the new preset-rules structure into account?
// If rule info metadata doesn't exist (e.g. full ruleset)

@@ -58,8 +59,7 @@ for (const tag of violation.tags.sort()) {

/**
* Return formatted string containing WCAG version, level and SC
* Return formatted string containing WCAG SC and Priority
*/
toString() {
if (!this.wcagVersion || !this.wcagLevel)
return this.successCriteria;
return `WCAG${this.wcagVersion}-Level${this.wcagLevel}-SC${this.successCriteria}-${this.priority}`;
const SC = this.successCriteria === WcagMetadata.defaultSC ? this.successCriteria : `WCAG-SC${this.successCriteria}`;
return `SA11Y-${SC}-${this.priority}`;
}

@@ -66,0 +66,0 @@ }

{
"name": "@sa11y/preset-rules",
"version": "1.0.0",
"version": "1.0.1",
"description": "Accessibility preset rule configs for axe",

@@ -31,3 +31,3 @@ "license": "BSD-3-Clause",

},
"gitHead": "87f76e0ddfbccfea1de8edee41642da661b9328a"
"gitHead": "fd5f1566e964e1e1a142ed0fdfdee75d593197d4"
}

@@ -30,3 +30,3 @@ # `@sa11y/preset-rules`

- `base` contains WCAG 2.1 AA rules available in axe-core.
- `extended` contains WCAG `AAA` rules, experimental rules and non-WCAG best-practice rules.
- `extended` contains WCAG AAA rules, experimental rules and non-WCAG best-practice rules.
- `full` ruleset consists of all rules that are enabled by default in axe.

@@ -33,0 +33,0 @@ - The default ruleset used by the sa11y APIs is `base`.

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