testaro 55.4.0 → 55.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "55.4.0",
3
+ "version": "55.5.0",
4
4
  "description": "Run 1000 web accessibility tests from 11 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/testaro.js CHANGED
@@ -78,7 +78,6 @@ const evalRules = {
78
78
  docType: 'document without a doctype property',
79
79
  dupAtt: 'elements with duplicate attributes',
80
80
  embAc: 'active elements embedded in links or buttons',
81
- filter: 'filter styles on elements',
82
81
  focAll: 'discrepancies between focusable and Tab-focused elements',
83
82
  focInd: 'missing and nonstandard focus indicators',
84
83
  focOp: 'Tab-focusable elements that are not operable',
package/testaro/filter.js DELETED
@@ -1,60 +0,0 @@
1
- /*
2
- © 2022–2023 CVS Health and/or one of its affiliates. All rights reserved.
3
-
4
- MIT License
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
23
- */
24
-
25
- /*
26
- filter
27
- This test reports elements whose styles include filter. The filter style property is considered
28
- inherently inaccessible, because it modifies the rendering of content, overriding user settings,
29
- and requires the user to apply custom styles to neutralize it, which is difficult or impossible
30
- in some user environments.
31
- */
32
-
33
- // ########## IMPORTS
34
-
35
- // Module to perform common operations.
36
- const {simplify} = require('../procs/testaro');
37
-
38
- // ########## FUNCTIONS
39
-
40
- // Runs the test and returns the result.
41
- exports.reporter = async (page, withItems) => {
42
- // Specify the rule.
43
- const ruleData = {
44
- ruleID: 'filter',
45
- selector: 'body *',
46
- pruner: async loc => await loc.evaluate(el => {
47
- const styleDec = window.getComputedStyle(el);
48
- return styleDec.filter !== 'none';
49
- }),
50
- isDestructive: false,
51
- complaints: {
52
- instance: 'Element has a filter style',
53
- summary: 'Elements have filter styles'
54
- },
55
- ordinalSeverity: 2,
56
- summaryTagName: ''
57
- };
58
- // Run the test and return the result.
59
- return await simplify(page, withItems, ruleData);
60
- };
@@ -1,161 +0,0 @@
1
- {
2
- "id": "filter",
3
- "what": "validation of filter test",
4
- "strict": true,
5
- "timeLimit": 20,
6
- "acts": [
7
- {
8
- "type": "launch",
9
- "which": "chromium",
10
- "url": "file://validation/tests/targets/filter/good.html",
11
- "what": "page with no filter styles"
12
- },
13
- {
14
- "type": "test",
15
- "which": "testaro",
16
- "withItems": true,
17
- "stopOnFail": true,
18
- "expect": [
19
- [
20
- "standardResult.totals.2",
21
- "=",
22
- 0
23
- ],
24
- [
25
- "standardResult.instances.length",
26
- "=",
27
- 0
28
- ]
29
- ],
30
- "rules": [
31
- "y",
32
- "filter"
33
- ]
34
- },
35
- {
36
- "type": "url",
37
- "which": "file://validation/tests/targets/filter/bad.html",
38
- "what": "page with filter styles"
39
- },
40
- {
41
- "type": "test",
42
- "which": "testaro",
43
- "withItems": true,
44
- "stopOnFail": true,
45
- "expect": [
46
- [
47
- "standardResult.totals.2",
48
- "=",
49
- 2
50
- ],
51
- [
52
- "standardResult.totals.1",
53
- "=",
54
- 0
55
- ],
56
- [
57
- "standardResult.instances.0.ruleID",
58
- "=",
59
- "filter"
60
- ],
61
- [
62
- "standardResult.instances.0.what",
63
- "i",
64
- "Element has"
65
- ],
66
- [
67
- "standardResult.instances.0.tagName",
68
- "=",
69
- "MAIN"
70
- ],
71
- [
72
- "standardResult.instances.0.ordinalSeverity",
73
- "=",
74
- 2
75
- ],
76
- [
77
- "standardResult.instances.1.tagName",
78
- "=",
79
- "UL"
80
- ],
81
- [
82
- "standardResult.instances.1.ordinalSeverity",
83
- "=",
84
- 2
85
- ],
86
- [
87
- "standardResult.instances.1.location.doc",
88
- "=",
89
- "dom"
90
- ],
91
- [
92
- "standardResult.instances.1.location.type",
93
- "=",
94
- "box"
95
- ],
96
- [
97
- "standardResult.instances.1.location.spec.y",
98
- ">",
99
- 0
100
- ],
101
- [
102
- "standardResult.instances.1.excerpt",
103
- "i",
104
- "Item"
105
- ]
106
- ],
107
- "rules": [
108
- "y",
109
- "filter"
110
- ]
111
- },
112
- {
113
- "type": "test",
114
- "which": "testaro",
115
- "withItems": false,
116
- "stopOnFail": true,
117
- "expect": [
118
- [
119
- "standardResult.totals.2",
120
- "=",
121
- 2
122
- ],
123
- [
124
- "standardResult.totals.1",
125
- "=",
126
- 0
127
- ],
128
- [
129
- "standardResult.instances.length",
130
- "=",
131
- 1
132
- ],
133
- [
134
- "standardResult.instances.0.ruleID",
135
- "=",
136
- "filter"
137
- ],
138
- [
139
- "standardResult.instances.0.what",
140
- "i",
141
- "Elements have"
142
- ],
143
- [
144
- "standardResult.instances.0.count",
145
- "=",
146
- 2
147
- ]
148
- ],
149
- "rules": [
150
- "y",
151
- "filter"
152
- ]
153
- }
154
- ],
155
- "sources": {
156
- },
157
- "standard": "only",
158
- "observe": false,
159
- "timeStamp": "240101T1500",
160
- "creationTimeStamp": "240101T1200"
161
- }
@@ -1,50 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--
3
- © 2023 CVS Health and/or one of its affiliates. All rights reserved.
4
-
5
- MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
24
- -->
25
- <html lang="en-US">
26
- <head>
27
- <meta charset="utf-8">
28
- <title>Page with filter styles</title>
29
- <meta name="description" content="tester">
30
- <meta name="viewport" content="width=device-width, initial-scale=1">
31
- <style>
32
- main {
33
- filter: blur(5px);
34
- }
35
- ul {
36
- filter: opacity(20%);
37
- }
38
- </style>
39
- </head>
40
- <body>
41
- <main>
42
- <h1>Page with filter styles</h1>
43
- <p>This is a paragraph.</p>
44
- <ul>
45
- <li>Item 1</li>
46
- <li>Item 2</li>
47
- </ul>
48
- </main>
49
- </body>
50
- </html>
@@ -1,42 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--
3
- © 2023 CVS Health and/or one of its affiliates. All rights reserved.
4
-
5
- MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
24
- -->
25
- <html lang="en-US">
26
- <head>
27
- <meta charset="utf-8">
28
- <title>Page without filter styles</title>
29
- <meta name="description" content="tester">
30
- <meta name="viewport" content="width=device-width, initial-scale=1">
31
- </head>
32
- <body>
33
- <main>
34
- <h1>Page without filter styles</h1>
35
- <p>This is a paragraph.</p>
36
- <ul>
37
- <li>Item 1</li>
38
- <li>Item 2</li>
39
- </ul>
40
- </main>
41
- </body>
42
- </html>