accessibility-checker 4.0.1 → 4.0.2

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.
Files changed (209) hide show
  1. package/bin/achecker.js +213 -262
  2. package/bin/achecker.js.map +1 -1
  3. package/cjs/bin/achecker.d.ts +2 -0
  4. package/cjs/bin/achecker.js +306 -0
  5. package/cjs/bin/achecker.js.map +1 -0
  6. package/cjs/index.d.ts +319 -0
  7. package/cjs/index.js +402 -0
  8. package/cjs/index.js.map +1 -0
  9. package/cjs/lib/ACBrowserManager.d.ts +22 -0
  10. package/cjs/lib/ACBrowserManager.js +172 -0
  11. package/cjs/lib/ACBrowserManager.js.map +1 -0
  12. package/cjs/lib/ACEngineManager.d.ts +19 -0
  13. package/cjs/lib/ACEngineManager.js +457 -0
  14. package/cjs/lib/ACEngineManager.js.map +1 -0
  15. package/cjs/lib/ACHelper.d.ts +2 -0
  16. package/cjs/lib/ACHelper.js +678 -0
  17. package/cjs/lib/ACHelper.js.map +1 -0
  18. package/cjs/lib/api/IChecker.d.ts +28 -0
  19. package/cjs/lib/api/IChecker.js +11 -0
  20. package/cjs/lib/api/IChecker.js.map +1 -0
  21. package/cjs/lib/api/IMapper.d.ts +37 -0
  22. package/cjs/lib/api/IMapper.js +18 -0
  23. package/cjs/lib/api/IMapper.js.map +1 -0
  24. package/cjs/lib/common/api-ext/Fetch.d.ts +17 -0
  25. package/cjs/lib/common/api-ext/Fetch.js +95 -0
  26. package/cjs/lib/common/api-ext/Fetch.js.map +1 -0
  27. package/cjs/lib/common/api-ext/IAbstractAPI.d.ts +33 -0
  28. package/cjs/lib/common/api-ext/IAbstractAPI.js +18 -0
  29. package/cjs/lib/common/api-ext/IAbstractAPI.js.map +1 -0
  30. package/cjs/lib/common/config/ACConfigManager.d.ts +13 -0
  31. package/cjs/lib/common/config/ACConfigManager.js +483 -0
  32. package/cjs/lib/common/config/ACConfigManager.js.map +1 -0
  33. package/cjs/lib/common/config/ACConstants.d.ts +17 -0
  34. package/cjs/lib/common/config/ACConstants.js +111 -0
  35. package/cjs/lib/common/config/ACConstants.js.map +1 -0
  36. package/cjs/lib/common/config/IArchive.d.ts +37 -0
  37. package/cjs/lib/common/config/IArchive.js +18 -0
  38. package/cjs/lib/common/config/IArchive.js.map +1 -0
  39. package/cjs/lib/common/config/IConfig.d.ts +152 -0
  40. package/cjs/lib/common/config/IConfig.js +36 -0
  41. package/cjs/lib/common/config/IConfig.js.map +1 -0
  42. package/cjs/lib/common/engine/IBounds.d.ts +21 -0
  43. package/cjs/lib/common/engine/IBounds.js +18 -0
  44. package/cjs/lib/common/engine/IBounds.js.map +1 -0
  45. package/cjs/lib/common/engine/IChecker.d.ts +23 -0
  46. package/cjs/lib/common/engine/IChecker.js +18 -0
  47. package/cjs/lib/common/engine/IChecker.js.map +1 -0
  48. package/cjs/lib/common/engine/IEngine.d.ts +39 -0
  49. package/cjs/lib/common/engine/IEngine.js +18 -0
  50. package/cjs/lib/common/engine/IEngine.js.map +1 -0
  51. package/cjs/lib/common/engine/IGuideline.d.ts +53 -0
  52. package/cjs/lib/common/engine/IGuideline.js +37 -0
  53. package/cjs/lib/common/engine/IGuideline.js.map +1 -0
  54. package/cjs/lib/common/engine/IMapper.d.ts +32 -0
  55. package/cjs/lib/common/engine/IMapper.js +18 -0
  56. package/cjs/lib/common/engine/IMapper.js.map +1 -0
  57. package/cjs/lib/common/engine/IReport.d.ts +143 -0
  58. package/cjs/lib/common/engine/IReport.js +44 -0
  59. package/cjs/lib/common/engine/IReport.js.map +1 -0
  60. package/cjs/lib/common/engine/IRule.d.ts +100 -0
  61. package/cjs/lib/common/engine/IRule.js +87 -0
  62. package/cjs/lib/common/engine/IRule.js.map +1 -0
  63. package/cjs/lib/common/engine/IRuleset.d.ts +20 -0
  64. package/cjs/lib/common/engine/IRuleset.js +18 -0
  65. package/cjs/lib/common/engine/IRuleset.js.map +1 -0
  66. package/cjs/lib/common/report/ACReporterCSV.d.ts +28 -0
  67. package/cjs/lib/common/report/ACReporterCSV.js +75 -0
  68. package/cjs/lib/common/report/ACReporterCSV.js.map +1 -0
  69. package/cjs/lib/common/report/ACReporterHTML.d.ts +27 -0
  70. package/cjs/lib/common/report/ACReporterHTML.js +61 -0
  71. package/cjs/lib/common/report/ACReporterHTML.js.map +1 -0
  72. package/cjs/lib/common/report/ACReporterJSON.d.ts +36 -0
  73. package/cjs/lib/common/report/ACReporterJSON.js +109 -0
  74. package/cjs/lib/common/report/ACReporterJSON.js.map +1 -0
  75. package/cjs/lib/common/report/ACReporterMetrics.d.ts +78 -0
  76. package/cjs/lib/common/report/ACReporterMetrics.js +135 -0
  77. package/cjs/lib/common/report/ACReporterMetrics.js.map +1 -0
  78. package/cjs/lib/common/report/ACReporterXLSX.d.ts +38 -0
  79. package/cjs/lib/common/report/ACReporterXLSX.js +996 -0
  80. package/cjs/lib/common/report/ACReporterXLSX.js.map +1 -0
  81. package/cjs/lib/common/report/BaselineManager.d.ts +169 -0
  82. package/cjs/lib/common/report/BaselineManager.js +382 -0
  83. package/cjs/lib/common/report/BaselineManager.js.map +1 -0
  84. package/cjs/lib/common/report/ReporterManager.d.ts +79 -0
  85. package/cjs/lib/common/report/ReporterManager.js +469 -0
  86. package/cjs/lib/common/report/ReporterManager.js.map +1 -0
  87. package/cjs/lib/common/report/genReport.d.ts +1 -0
  88. package/cjs/lib/common/report/genReport.js +12 -0
  89. package/cjs/lib/common/report/genReport.js.map +1 -0
  90. package/cjs/package.json +3 -0
  91. package/index.js +21 -63
  92. package/index.js.map +1 -1
  93. package/lib/ACBrowserManager.js +138 -203
  94. package/lib/ACBrowserManager.js.map +1 -1
  95. package/lib/ACEngineManager.js +395 -402
  96. package/lib/ACEngineManager.js.map +1 -1
  97. package/lib/ACHelper.js +581 -642
  98. package/lib/ACHelper.js.map +1 -1
  99. package/lib/common/api-ext/Fetch.js +58 -78
  100. package/lib/common/api-ext/Fetch.js.map +1 -1
  101. package/lib/common/config/ACConfigManager.js +271 -281
  102. package/lib/common/config/ACConfigManager.js.map +1 -1
  103. package/lib/common/config/ACConstants.js +38 -4
  104. package/lib/common/config/ACConstants.js.map +1 -1
  105. package/lib/common/config/IConfig.d.ts +1 -1
  106. package/lib/common/report/ACReporterCSV.js +42 -77
  107. package/lib/common/report/ACReporterCSV.js.map +1 -1
  108. package/lib/common/report/ACReporterHTML.js +15 -48
  109. package/lib/common/report/ACReporterHTML.js.map +1 -1
  110. package/lib/common/report/ACReporterJSON.js +59 -94
  111. package/lib/common/report/ACReporterJSON.js.map +1 -1
  112. package/lib/common/report/ACReporterMetrics.js +45 -108
  113. package/lib/common/report/ACReporterMetrics.js.map +1 -1
  114. package/lib/common/report/ACReporterXLSX.js +282 -300
  115. package/lib/common/report/ACReporterXLSX.js.map +1 -1
  116. package/lib/common/report/BaselineManager.js +82 -56
  117. package/lib/common/report/BaselineManager.js.map +1 -1
  118. package/lib/common/report/ReporterManager.js +125 -190
  119. package/lib/common/report/ReporterManager.js.map +1 -1
  120. package/lib/common/report/genReport.js +2 -2
  121. package/mjs/bin/achecker.d.ts +2 -0
  122. package/mjs/bin/achecker.js +236 -0
  123. package/mjs/bin/achecker.js.map +1 -0
  124. package/mjs/index.d.ts +319 -0
  125. package/mjs/index.js +368 -0
  126. package/mjs/index.js.map +1 -0
  127. package/mjs/lib/ACBrowserManager.d.ts +22 -0
  128. package/mjs/lib/ACBrowserManager.js +121 -0
  129. package/mjs/lib/ACBrowserManager.js.map +1 -0
  130. package/mjs/lib/ACEngineManager.d.ts +19 -0
  131. package/mjs/lib/ACEngineManager.js +397 -0
  132. package/mjs/lib/ACEngineManager.js.map +1 -0
  133. package/mjs/lib/ACHelper.d.ts +2 -0
  134. package/mjs/lib/ACHelper.js +614 -0
  135. package/mjs/lib/ACHelper.js.map +1 -0
  136. package/mjs/lib/api/IChecker.d.ts +28 -0
  137. package/mjs/lib/api/IChecker.js +8 -0
  138. package/mjs/lib/api/IChecker.js.map +1 -0
  139. package/mjs/lib/api/IMapper.d.ts +37 -0
  140. package/mjs/lib/api/IMapper.js +17 -0
  141. package/mjs/lib/api/IMapper.js.map +1 -0
  142. package/mjs/lib/common/api-ext/Fetch.d.ts +17 -0
  143. package/mjs/lib/common/api-ext/Fetch.js +45 -0
  144. package/mjs/lib/common/api-ext/Fetch.js.map +1 -0
  145. package/mjs/lib/common/api-ext/IAbstractAPI.d.ts +33 -0
  146. package/mjs/lib/common/api-ext/IAbstractAPI.js +17 -0
  147. package/mjs/lib/common/api-ext/IAbstractAPI.js.map +1 -0
  148. package/mjs/lib/common/config/ACConfigManager.d.ts +13 -0
  149. package/mjs/lib/common/config/ACConfigManager.js +421 -0
  150. package/mjs/lib/common/config/ACConfigManager.js.map +1 -0
  151. package/mjs/lib/common/config/ACConstants.d.ts +17 -0
  152. package/mjs/lib/common/config/ACConstants.js +75 -0
  153. package/mjs/lib/common/config/ACConstants.js.map +1 -0
  154. package/mjs/lib/common/config/IArchive.d.ts +37 -0
  155. package/mjs/lib/common/config/IArchive.js +17 -0
  156. package/mjs/lib/common/config/IArchive.js.map +1 -0
  157. package/mjs/lib/common/config/IConfig.d.ts +152 -0
  158. package/mjs/lib/common/config/IConfig.js +33 -0
  159. package/mjs/lib/common/config/IConfig.js.map +1 -0
  160. package/mjs/lib/common/engine/IBounds.d.ts +21 -0
  161. package/mjs/lib/common/engine/IBounds.js +17 -0
  162. package/mjs/lib/common/engine/IBounds.js.map +1 -0
  163. package/mjs/lib/common/engine/IChecker.d.ts +23 -0
  164. package/mjs/lib/common/engine/IChecker.js +17 -0
  165. package/mjs/lib/common/engine/IChecker.js.map +1 -0
  166. package/mjs/lib/common/engine/IEngine.d.ts +39 -0
  167. package/mjs/lib/common/engine/IEngine.js +17 -0
  168. package/mjs/lib/common/engine/IEngine.js.map +1 -0
  169. package/mjs/lib/common/engine/IGuideline.d.ts +53 -0
  170. package/mjs/lib/common/engine/IGuideline.js +34 -0
  171. package/mjs/lib/common/engine/IGuideline.js.map +1 -0
  172. package/mjs/lib/common/engine/IMapper.d.ts +32 -0
  173. package/mjs/lib/common/engine/IMapper.js +17 -0
  174. package/mjs/lib/common/engine/IMapper.js.map +1 -0
  175. package/mjs/lib/common/engine/IReport.d.ts +143 -0
  176. package/mjs/lib/common/engine/IReport.js +36 -0
  177. package/mjs/lib/common/engine/IReport.js.map +1 -0
  178. package/mjs/lib/common/engine/IRule.d.ts +100 -0
  179. package/mjs/lib/common/engine/IRule.js +79 -0
  180. package/mjs/lib/common/engine/IRule.js.map +1 -0
  181. package/mjs/lib/common/engine/IRuleset.d.ts +20 -0
  182. package/mjs/lib/common/engine/IRuleset.js +17 -0
  183. package/mjs/lib/common/engine/IRuleset.js.map +1 -0
  184. package/mjs/lib/common/report/ACReporterCSV.d.ts +28 -0
  185. package/mjs/lib/common/report/ACReporterCSV.js +60 -0
  186. package/mjs/lib/common/report/ACReporterCSV.js.map +1 -0
  187. package/mjs/lib/common/report/ACReporterHTML.d.ts +27 -0
  188. package/mjs/lib/common/report/ACReporterHTML.js +46 -0
  189. package/mjs/lib/common/report/ACReporterHTML.js.map +1 -0
  190. package/mjs/lib/common/report/ACReporterJSON.d.ts +36 -0
  191. package/mjs/lib/common/report/ACReporterJSON.js +94 -0
  192. package/mjs/lib/common/report/ACReporterJSON.js.map +1 -0
  193. package/mjs/lib/common/report/ACReporterMetrics.d.ts +78 -0
  194. package/mjs/lib/common/report/ACReporterMetrics.js +122 -0
  195. package/mjs/lib/common/report/ACReporterMetrics.js.map +1 -0
  196. package/mjs/lib/common/report/ACReporterXLSX.d.ts +38 -0
  197. package/mjs/lib/common/report/ACReporterXLSX.js +948 -0
  198. package/mjs/lib/common/report/ACReporterXLSX.js.map +1 -0
  199. package/mjs/lib/common/report/BaselineManager.d.ts +169 -0
  200. package/mjs/lib/common/report/BaselineManager.js +348 -0
  201. package/mjs/lib/common/report/BaselineManager.js.map +1 -0
  202. package/mjs/lib/common/report/ReporterManager.d.ts +79 -0
  203. package/mjs/lib/common/report/ReporterManager.js +469 -0
  204. package/mjs/lib/common/report/ReporterManager.js.map +1 -0
  205. package/mjs/lib/common/report/genReport.d.ts +1 -0
  206. package/mjs/lib/common/report/genReport.js +9 -0
  207. package/mjs/lib/common/report/genReport.js.map +1 -0
  208. package/mjs/package.json +3 -0
  209. package/package.json +10 -4
@@ -0,0 +1,37 @@
1
+ /******************************************************************************
2
+ Copyright:: 2023- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ export interface IArchive {
17
+ id: "latest" | "preview" | "versioned" | string;
18
+ name: string;
19
+ path: string;
20
+ policies: Array<{
21
+ id: string;
22
+ name: string;
23
+ description: string;
24
+ }>;
25
+ rulesets: {
26
+ [key: string]: Array<{
27
+ id: string;
28
+ name: string;
29
+ description: string;
30
+ }>;
31
+ };
32
+ version: string;
33
+ latest?: boolean;
34
+ sunset?: boolean;
35
+ helpPath: string;
36
+ enginePath: string;
37
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2023- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=IArchive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IArchive.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/config/IArchive.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
@@ -0,0 +1,152 @@
1
+ /******************************************************************************
2
+ Copyright:: 2023- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ import { IArchive } from "./IArchive.js";
17
+ export declare enum eAssertResult {
18
+ ERROR = -1,
19
+ PASS = 0,
20
+ BASELINE_MISMATCH = 1,
21
+ FAIL = 2
22
+ }
23
+ export declare enum eRuleLevel {
24
+ violation = "violation",
25
+ potentialviolation = "potentialviolation",
26
+ recommendation = "recommendation",
27
+ potentialrecommendation = "potentialrecommendation",
28
+ manual = "manual",
29
+ pass = "pass",
30
+ ignored = "ignored"
31
+ }
32
+ export interface IConfig {
33
+ /**
34
+ * (optional) Specify the rule archive
35
+ *
36
+ * Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
37
+ * Default: "latest"
38
+ */
39
+ ruleArchive?: "latest" | "preview" | "versioned" | string;
40
+ /**
41
+ * (optional) Specify one or many policies to scan.
42
+ *
43
+ * Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
44
+ * Default: ["IBM_Accessibility"]
45
+ */
46
+ policies?: Array<"IBM_Accessibility" | string>;
47
+ /**
48
+ * (optional) Specify one or many violation levels on which to fail the test
49
+ *
50
+ * i.e. If specified violation then the testcase will only fail if
51
+ * a violation is found during the scan.
52
+ * Default: ["violation", "review"]
53
+ */
54
+ failLevels?: eRuleLevel[];
55
+ /**
56
+ * (optional) Specify one or many violation levels which should be reported
57
+ *
58
+ * i.e. If specified violation then in the report it would only contain
59
+ * results which are level of violation.
60
+ * Default: ["violation", "review"]
61
+ */
62
+ reportLevels?: eRuleLevel[];
63
+ /**
64
+ * (optional) In which fornats should the results be output
65
+ * Default: ["json"]
66
+ */
67
+ outputFormat?: Array<"json" | "html" | "csv" | "disable" | "xlsx">;
68
+ /**
69
+ * (optional) Specify any labels that you would like associated to your scan
70
+ * Default: []
71
+ */
72
+ label?: string[];
73
+ /**
74
+ * (optional) Where the scan results should be saved.
75
+ * Default: "results"
76
+ */
77
+ outputFolder?: string;
78
+ /**
79
+ * (optional) Should the timestamp be included in the filename of the reports?
80
+ * Default: true
81
+ */
82
+ outputFilenameTimestamp?: boolean;
83
+ /**
84
+ * (optional) Where the baseline results should be loaded from
85
+ * Default: "baselines"
86
+ */
87
+ baselineFolder?: string;
88
+ /**
89
+ * (optional) Where the tool can read/write cached files (ace-node.js / archive.json)
90
+ * Default: `${os.tmpdir()}/accessibility-checker/`
91
+ */
92
+ cacheFolder?: string;
93
+ /**
94
+ * (optional) For tools that scan files, which extensions should we include
95
+ * Default: ["html", "htm", "svg"]
96
+ */
97
+ extensions?: string[];
98
+ }
99
+ export type IConfigInternal = IConfig & {
100
+ /**
101
+ * Run in debug mode
102
+ */
103
+ DEBUG?: boolean;
104
+ /**
105
+ * Spot to store parsed archive file
106
+ */
107
+ ruleArchiveSet?: IArchive[];
108
+ /**
109
+ * Label to expose to reports
110
+ */
111
+ ruleArchiveLabel?: string;
112
+ /**
113
+ * (optional) Rule server to pull the rules from and to use for help
114
+ * Default: "https://able.ibm.com/rules"
115
+ */
116
+ ruleServer?: string;
117
+ /**
118
+ * Path to the rule pack
119
+ */
120
+ rulePack?: string;
121
+ /**
122
+ * Path within the archive
123
+ */
124
+ ruleArchivePath?: string;
125
+ /**
126
+ * Version number of the selected archive
127
+ */
128
+ ruleArchiveVersion?: string;
129
+ /**
130
+ * (optional) If the tool allows, should we capture screenshots
131
+ */
132
+ captureScreenshots?: boolean;
133
+ /**
134
+ * (optional) If the tool allows, should we run headless
135
+ */
136
+ headless?: "shell" | boolean;
137
+ /**
138
+ * (optional) If the tool allows, set the maximum number of tabs to open
139
+ */
140
+ maxTabs?: number;
141
+ /**
142
+ * Configuration filenames to try loading
143
+ */
144
+ configFiles?: string[];
145
+ toolID?: string;
146
+ toolName?: string;
147
+ toolVersion?: string;
148
+ scanID?: string;
149
+ ignoreHTTPSErrors: boolean;
150
+ perfMetrics: boolean;
151
+ engineMode: "DEFAULT" | "REMOTE" | "INJECT";
152
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2023- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.eRuleLevel = exports.eAssertResult = void 0;
19
+ var eAssertResult;
20
+ (function (eAssertResult) {
21
+ eAssertResult[eAssertResult["ERROR"] = -1] = "ERROR";
22
+ eAssertResult[eAssertResult["PASS"] = 0] = "PASS";
23
+ eAssertResult[eAssertResult["BASELINE_MISMATCH"] = 1] = "BASELINE_MISMATCH";
24
+ eAssertResult[eAssertResult["FAIL"] = 2] = "FAIL";
25
+ })(eAssertResult || (exports.eAssertResult = eAssertResult = {}));
26
+ var eRuleLevel;
27
+ (function (eRuleLevel) {
28
+ eRuleLevel["violation"] = "violation";
29
+ eRuleLevel["potentialviolation"] = "potentialviolation";
30
+ eRuleLevel["recommendation"] = "recommendation";
31
+ eRuleLevel["potentialrecommendation"] = "potentialrecommendation";
32
+ eRuleLevel["manual"] = "manual";
33
+ eRuleLevel["pass"] = "pass";
34
+ eRuleLevel["ignored"] = "ignored";
35
+ })(eRuleLevel || (exports.eRuleLevel = eRuleLevel = {}));
36
+ //# sourceMappingURL=IConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IConfig.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/config/IConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAI/E,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,oDAAU,CAAA;IACV,iDAAQ,CAAA;IACR,2EAAqB,CAAA;IACrB,iDAAQ,CAAA;AACZ,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAGD,IAAY,UAQX;AARD,WAAY,UAAU;IAClB,qCAAuB,CAAA;IACvB,uDAAyC,CAAA;IACzC,+CAAiC,CAAA;IACjC,iEAAmD,CAAA;IACnD,+BAAiB,CAAA;IACjB,2BAAa,CAAA;IACb,iCAAmB,CAAA;AACvB,CAAC,EARW,UAAU,0BAAV,UAAU,QAQrB"}
@@ -0,0 +1,21 @@
1
+ /******************************************************************************
2
+ Copyright:: 2020- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ export type Bounds = {
17
+ left: number;
18
+ top: number;
19
+ width: number;
20
+ height: number;
21
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2020- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=IBounds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBounds.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IBounds.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
@@ -0,0 +1,23 @@
1
+ /******************************************************************************
2
+ Copyright:: 2020- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ import { Guideline } from "./IGuideline.js";
17
+ import { IEngineReport } from "./IReport.js";
18
+ export interface IChecker {
19
+ addGuideline(guideline: Guideline): any;
20
+ getGuidelines(): Guideline[];
21
+ getGuidelineIds(): string[];
22
+ check(node: Node | Document, guidelineIds?: string | string[]): Promise<IEngineReport>;
23
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2020- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=IChecker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IChecker.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IChecker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
@@ -0,0 +1,39 @@
1
+ /******************************************************************************
2
+ Copyright:: 2020- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ import { Rule } from "./IRule.js";
17
+ export interface IEngine {
18
+ /**
19
+ * Perform a scan on a document or subtree
20
+ * @param rulesetIds Array of ruleset ids of rulesets to use for this scan
21
+ * @param root Document or subtree to scan
22
+ */
23
+ run(root: Document | Node, options?: {}): Promise<Report>;
24
+ enableRules(ruleIds: string[]): any;
25
+ getRule(ruleId: string): Rule;
26
+ getRulesIds(): string[];
27
+ getMessage(ruleId: string, ruleIdx: number | string, msgArgs?: string[]): string;
28
+ getHelp(ruleId: string, ruleIdx: number | string): string;
29
+ addRules(rule: Rule[]): any;
30
+ addRule(rule: Rule): any;
31
+ addNlsMap(map: NlsMap): any;
32
+ addHelpMap(map: NlsMap): any;
33
+ }
34
+ export type NlsMap = {
35
+ [key: string]: string[];
36
+ };
37
+ export type HelpMap = {
38
+ [key: string]: string[];
39
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2020- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=IEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEngine.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IEngine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
@@ -0,0 +1,53 @@
1
+ /******************************************************************************
2
+ Copyright:: 2020- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ import { eRulePolicy } from "./IRule.js";
17
+ export declare enum eToolkitLevel {
18
+ LEVEL_ONE = "1",
19
+ LEVEL_TWO = "2",
20
+ LEVEL_THREE = "3",
21
+ LEVEL_FOUR = "4"
22
+ }
23
+ export declare enum eGuidelineCategory {
24
+ ACCESSIBILITY = "Accessibility",
25
+ DESIGN = "Design",
26
+ OTHER = "Other"
27
+ }
28
+ export declare enum eGuidelineType {
29
+ DEFAULT = "default",
30
+ EXTENSION = "extension"
31
+ }
32
+ export type Checkpoint = {
33
+ num: string;
34
+ scId?: string;
35
+ name: string;
36
+ wcagLevel: string;
37
+ summary: string;
38
+ rules?: Array<{
39
+ id: string;
40
+ reasonCodes?: string[];
41
+ level: eRulePolicy;
42
+ toolkitLevel: eToolkitLevel;
43
+ enabled?: boolean;
44
+ }>;
45
+ };
46
+ export type Guideline = {
47
+ id: string;
48
+ name: string;
49
+ category: eGuidelineCategory;
50
+ description: string;
51
+ type?: eGuidelineType;
52
+ checkpoints: Array<Checkpoint>;
53
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2020- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.eGuidelineType = exports.eGuidelineCategory = exports.eToolkitLevel = void 0;
19
+ var eToolkitLevel;
20
+ (function (eToolkitLevel) {
21
+ eToolkitLevel["LEVEL_ONE"] = "1";
22
+ eToolkitLevel["LEVEL_TWO"] = "2";
23
+ eToolkitLevel["LEVEL_THREE"] = "3";
24
+ eToolkitLevel["LEVEL_FOUR"] = "4";
25
+ })(eToolkitLevel || (exports.eToolkitLevel = eToolkitLevel = {}));
26
+ var eGuidelineCategory;
27
+ (function (eGuidelineCategory) {
28
+ eGuidelineCategory["ACCESSIBILITY"] = "Accessibility";
29
+ eGuidelineCategory["DESIGN"] = "Design";
30
+ eGuidelineCategory["OTHER"] = "Other";
31
+ })(eGuidelineCategory || (exports.eGuidelineCategory = eGuidelineCategory = {}));
32
+ var eGuidelineType;
33
+ (function (eGuidelineType) {
34
+ eGuidelineType["DEFAULT"] = "default";
35
+ eGuidelineType["EXTENSION"] = "extension";
36
+ })(eGuidelineType || (exports.eGuidelineType = eGuidelineType = {}));
37
+ //# sourceMappingURL=IGuideline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGuideline.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IGuideline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAI/E,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,iCAAgB,CAAA;AACpB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,qDAA+B,CAAA;IAC/B,uCAAiB,CAAA;IACjB,qCAAe,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
@@ -0,0 +1,32 @@
1
+ /******************************************************************************
2
+ Copyright:: 2020- IBM, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ *****************************************************************************/
16
+ import { Bounds } from "./IBounds.js";
17
+ export type IMapResult = {
18
+ node: Node;
19
+ namespace: string;
20
+ role: string;
21
+ rolePath: string;
22
+ attributes: {
23
+ [key: string]: string;
24
+ };
25
+ bounds?: Bounds;
26
+ };
27
+ export interface IMapper {
28
+ reset(node: Node): void;
29
+ openScope(node: Node): IMapResult[];
30
+ closeScope(node: Node): IMapResult[];
31
+ getNamespace(): string;
32
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /******************************************************************************
3
+ Copyright:: 2020- IBM, Inc
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ *****************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=IMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMapper.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IMapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}