@brightspace-ui/core 2.163.0 → 2.164.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.163.0",
3
+ "version": "2.164.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",
@@ -51,7 +51,6 @@
51
51
  "@rollup/plugin-node-resolve": "^15",
52
52
  "@rollup/plugin-replace": "^5",
53
53
  "@web/dev-server": "^0.2",
54
- "axe-core": "^4",
55
54
  "chalk": "^5",
56
55
  "eslint": "^8",
57
56
  "eslint-config-brightspace": "^0.23",
@@ -1,39 +0,0 @@
1
- /*eslint no-console: 0*/
2
- /*eslint no-undef: 0*/
3
- import 'axe-core/axe.min.js';
4
-
5
- /*
6
- * Rules can be disabled using the options parameter:
7
- * options = { "rules":
8
- * {
9
- * "color-contrast": { enabled: false },
10
- * "valid-lang": { enabled: false }
11
- * }
12
- * }
13
- * Rule ids can be found here: https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md
14
- */
15
- export async function runAxe(element, options) {
16
- const results = await axe.run(element, options);
17
-
18
- const violations = results.violations;
19
-
20
- console.log('Inapplicable Tests:', results.inapplicable.length);
21
- console.log('Passed Tests:', results.passes.length);
22
- console.log('Failed Tests:', results.violations.length);
23
-
24
- if (!violations.length) {
25
- return Promise.resolve();
26
- }
27
- const errorMessage = ['Accessibility Violations', '---'];
28
- for (const violation of violations) {
29
- errorMessage.push(violation.help);
30
- for (const node of violation.nodes) {
31
- if (node.failureSummary) {
32
- errorMessage.push(node.failureSummary);
33
- }
34
- errorMessage.push(node.html);
35
- }
36
- errorMessage.push('---');
37
- }
38
- return Promise.reject(new Error(errorMessage.join('\n')));
39
- }