@qualweb/core 0.7.19 → 0.7.22

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 (5) hide show
  1. package/LICENSE +14 -14
  2. package/README.md +497 -497
  3. package/dist/index.d.ts +19 -19
  4. package/dist/index.js +232 -232
  5. package/package.json +100 -100
package/README.md CHANGED
@@ -1,497 +1,497 @@
1
- # QualWeb core
2
-
3
- The core allows you to perform automatic accessibility evaluations on web pages. It contains 3 evaluation modules:
4
-
5
- - [@qualweb/act-rules](https://github.com/qualweb/act-rules)
6
- - [@qualweb/wcag-techniques](https://github.com/qualweb/wcag-techniques)
7
- - [@qualweb/best-practices](https://github.com/qualweb/best-practices)
8
-
9
- You can also perform evaluations at [http://qualweb.di.fc.ul.pt/evaluator/](http://qualweb.di.fc.ul.pt/evaluator/), or by installing the [chrome extension](https://chrome.google.com/webstore/detail/qualweb-extension/ljgilomdnehokancdcbkmbndkkiggioc).
10
-
11
- ## How to install
12
-
13
- ```shell
14
- $ npm i @qualweb/core --save
15
- ```
16
-
17
- ## How to run
18
-
19
- ```javascript
20
- 'use strict';
21
-
22
- const { QualWeb, generateEARLReport } = require('@qualweb/core');
23
-
24
- (async () => {
25
- const plugins = {
26
- // Check https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-adblocker
27
- adBlock: true, // Default value = false
28
- // Check https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth
29
- stealth: true // Default value = false
30
- };
31
- const qualweb = new QualWeb(plugins);
32
-
33
- const clusterOptions = {
34
- maxConcurrency: 5, // Performs several urls evaluations at the same time - the higher the number given, more resources will be used. Default value = 1
35
- timeout: 60 * 1000, // Timeout for loading page. Default value = 30 seconds
36
- monitor: true // Displays urls information on the terminal. Default value = false
37
- };
38
-
39
- const launchOptions = {
40
- ... // check https://github.com/puppeteer/puppeteer/blob/v10.1.0/docs/api.md#puppeteerlaunchoptions
41
- // In most cases there's no need to give additional options. Just leave the field undefined
42
- };
43
-
44
- // Starts the QualWeb core engine
45
- await qualweb.start(clusterOptions, launchOptions);
46
-
47
- // QualWeb evaluation report
48
- const qualwebOptions = {
49
- url: 'https://act-rules.github.io/pages/about/',
50
- ...
51
- };
52
-
53
- // Evaluates the given options - will only return after all urls have finished evaluating or resulted in an error
54
- const reports = await qualweb.evaluate(qualwebOptions);
55
-
56
- console.log(reports);
57
- // {
58
- // "url": "report",
59
- // "url2": "report2"
60
- // }
61
-
62
- // Stops the QualWeb core engine
63
- await qualweb.stop();
64
-
65
- const earlOptions = {
66
- // Check the options in the section below
67
- };
68
-
69
- // if you want an EARL report
70
- const earlReports = generateEARLReport(reports, earlOptions);
71
-
72
- console.log(earlReports);
73
- // {
74
- // "url": "earlReport",
75
- // "url2": "earlReport2"
76
- // }
77
- })();
78
- ```
79
-
80
- ## Options
81
-
82
- The available options fot the **evaluate()** function are:
83
-
84
- ```jsonc
85
- {
86
- "url": "https://act-rules.github.io/pages/about/", // url to evaluate
87
- "urls": ["https://act-rules.github.io/pages/about/", "https://act-rules.github.io/rules/"], // Array of urls
88
- "file": "/path/to/file/with/urls", // urls must be separated by a newline (\n)
89
- "crawl": "https://act-rules.github.io", // Domain to crawl and obtain the urls
90
- "html": "<html-code>", // Full webpage html, or just small snippets
91
- "log": {
92
- "file": true, // Logs errors to a file. Default value = false
93
- "console": false // Logs errors to the console. Default value = false
94
- },
95
- "viewport": {
96
- "mobile": false, // default value = false
97
- "landscape": true, // default value = viewPort.width > viewPort.height
98
- "userAgent": "custom user agent", // default value for desktop = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0', default value for mobile = 'Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
99
- "resolution": {
100
- "width": 1920, // default value for desktop = 1366, default value for mobile = 1080
101
- "height": 1080 // default value for desktop = 768, default value for mobile = 1920
102
- }
103
- },
104
- "waitUntil": ["load", "networkidle0"], // Events to wait before starting evaluation, default value = "load". For more check https://github.com/puppeteer/puppeteer/blob/v10.1.0/docs/api.md#pagegotourl-options
105
- "validator": "http://127.0.0.1/validate", // HTML validator service endpoint. The url will be attached after of the given endpoint
106
- "crawlOptions": {
107
- "maxDepth": 2, // max depth to search, 0 to search only the given domain. Default value = -1 (search everything)
108
- "maxUrls": 100, // max urls to find. Default value = -1 (search everything)
109
- "timeout": 60, // how many seconds the domain should be crawled before it ends. Default value = -1 (never stops)
110
- "maxParallelCrawls": 10, // max urls to crawl at the same time. Default value = 5
111
- "logging": true // logs domain, current depth, urls found and time passed to the terminal
112
- },
113
- "translate": "en", // OR { "translate": "en", "fallback": "en" } OR { own translation object } check https://github.com/qualweb/locale#readme. Default = "en"
114
- "execute": {
115
- // choose which modules to execute
116
- "wappalyzer": false, // wappalyzer module (https://github.com/qualweb/wappalyzer) - default value = false
117
- "act": true, // act-rules module (https://github.com/qualweb/act-rules) - default value = true
118
- "wcag": true, // wcag-techniques module (https://github.com/qualweb/wcag-techniques) - default value = true
119
- "bp": false, // best-practices module (https://github.com/qualweb/best-practices) - default value = true
120
- "counter": false // counter module (https://github.com/qualweb/counter) - default value = false
121
- },
122
- "act-rules": {
123
- // More information about this options at https://github.com/qualweb/act-rules
124
- "rules": ["QW-ACT-R1", "b5c3f8"], // Array of rules to execute, can be passed the QualWeb Rule ID or the ACT Rule ID
125
- "exclude": ["QW-ACT-R1", "b5c3f8"], // Array of rules to exclude, can be passed the QualWeb Rule ID or the ACT Rule ID
126
- "levels": ["A", "AA", "AAA"], // Conformance levels to execute,
127
- "principles": ["Perceivable", "Operable", "Understandable", "Robust"] // Principles to execute
128
- },
129
- "wcag-techniques": {
130
- // More information about this options at https://github.com/qualweb/wcag-techniques
131
- "rules": ["QW-WCAG-T1", "H39"], // Array of techniques to execute, can be passed the QualWeb Technique ID or the WCAG 2.1 Technique Code
132
- "exclude": ["QW-WCAG-T1", "H39"], // Array of techniques to exclude, can be passed the QualWeb Technique ID or the WCAG 2.1 Technique Code
133
- "levels": ["A", "AA", "AAA"], // Conformance levels to execute,
134
- "principles": ["Perceivable", "Operable", "Understandable", "Robust"] // Principles to execute
135
- },
136
- "best-practices": {
137
- // More information about this options at https://github.com/qualweb/best-practices
138
- "bestPractices": ["QW-BP1", "QW-BP2"], // Array of best practices to execute
139
- "exclude": ["QW-BP1", "QW-BP2"] // Array of best practices to exclude
140
- }
141
- }
142
- ```
143
-
144
- The available options fot the **generateEARLReport()** function are:
145
-
146
- ```jsonc
147
- {
148
- "aggregated": true, // default value = false
149
- "aggregatedName": "websites.json", // The name to save the aggregated earl reports. default value = first url of the list
150
- "modules": {
151
- // Choose which modules to convert the report to earl, by default all modules are converted if they were executed
152
- "act": true, // default value = true
153
- "wcag": false, // default value = true
154
- "best-practices": false // default value = true
155
- } // If the "modules" value is given, any missing module value missing it's automatically set to false
156
- }
157
- ```
158
-
159
- ## Report details
160
-
161
- In this section it's explained the evaluation report in detail. For a detailed version of the EARL report check [@qualweb/earl-reporter](https://github.com/qualweb/earl-reporter#report-details).
162
-
163
- ```jsonc
164
- {
165
- "type": "evaluation",
166
- "system": {
167
- "name": "QualWeb",
168
- "description": "QualWeb is an automatic accessibility evaluator for webpages.",
169
- "version": "QualWeb version",
170
- "homepage": "http://www.qualweb.di.fc.ul.pt/",
171
- "date": "date of the evaluation",
172
- "hash": "unique hash",
173
- "url": {
174
- "inputUrl": "inserted url",
175
- "protocol": "protocol of the url",
176
- "domainName": "domain name of the url",
177
- "domain": "domain of the url",
178
- "uri": "uri of the url",
179
- "completeUrl": "complete url after all redirects"
180
- },
181
- "page": {
182
- "viewport": {
183
- "mobile": "was evaluated on a mobile context or not",
184
- "landscape": "was evaluated on a landscape context or not",
185
- "userAgent": "user agent used",
186
- "resolution": {
187
- "width": "window's width used",
188
- "height": "window's height used",
189
- }
190
- },
191
- "dom": {
192
- "html": "html code as a string",
193
- "title": "Title of the webpage",
194
- "elementCount": "Element count of the webpage"
195
- }
196
- }
197
- },
198
- "metadata": {
199
- "passed": "number of passed rules/techniques/best practices",
200
- "warning": "number of warning rules/techniques/best practices",
201
- "failed": "number of failed rules/techniques/best practices",
202
- "inapplicable": "number of inapplicable rules/techniques/best practices",
203
- },
204
- "modules": {
205
- "act-rules": {
206
- "type": "act-rules",
207
- "metadata": {
208
- "passed": "number of passed rules",
209
- "warning": "number of warning rules",
210
- "failed": "number of failed rules",
211
- "inapplicable": "number of inapplicable rules",
212
- },
213
- "assertions": {
214
- "QW_ACT_R1": {
215
- "name": "Name of the rule",
216
- "code": "QualWeb rule id",
217
- "mapping": "ACT rule id mapping",
218
- "description": "Description of the rule",
219
- "metadata": {
220
- "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
221
- "success-criteria?": [
222
- {
223
- "name": "Name of the success criteria",
224
- "level": "Level of conformance of the success criteria",
225
- "principle": "Principle of the success criteria",
226
- "url": "Url of the success criteria"
227
- }
228
- ],
229
- "related?": [], // related WCAG 2.1 techniques
230
- "url?": "Url of the rule",
231
- "passed": "Number of passed results",
232
- "warning": "Number of warning results",
233
- "failed": "Number ff failed results",
234
- "type?": [], // usually "ACTRule" or "TestCase"
235
- "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
236
- "outcome": "Outcome of the rule",
237
- "description": "Description of the outcome";
238
- },
239
- "results": [
240
- {
241
- "verdict": "Outcome of the test",
242
- "description": "Description of the test",
243
- "resultCode": "Test identifier",
244
- "pointer?": "Element pointer in CSS notation",
245
- "htmlCode?": "Element html code",
246
- "attributes?": "Attributes of the element",
247
- "accessibleName?": "Accessible name of the test target"
248
- },
249
- { ... }
250
- ]
251
- },
252
- "...": { ... }
253
- }
254
- },
255
- "wcag-techniques": {
256
- "type": "wcag-techniques",
257
- "metadata": {
258
- "passed": "number of passed techniques",
259
- "warning": "number of warning techniques",
260
- "failed": "number of failed techniques",
261
- "inapplicable": "number of inapplicable techniques",
262
- },
263
- "assertions": {
264
- "QW_WCAG_T1": {
265
- "name": "Name of the technique",
266
- "code": "QualWeb technique id",
267
- "mapping": "WCAG techniques code mapping",
268
- "description": "Description of the technique",
269
- "metadata": {
270
- "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
271
- "success-criteria?": [
272
- {
273
- "name": "Name of the success criteria",
274
- "level": "Level of conformance of the success criteria",
275
- "principle": "Principle of the success criteria",
276
- "url": "Url of the success criteria"
277
- }
278
- ],
279
- "related?": [], // related WCAG 2.1 techniques
280
- "url?": "Url of the technique",
281
- "passed": "Number of passed results",
282
- "warning": "Number of warning results",
283
- "failed": "Number ff failed results",
284
- "type?": [], // usually "ACTRule" or "TestCase"
285
- "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
286
- "outcome": "Outcome of the technique",
287
- "description": "Description of the outcome";
288
- },
289
- "results": [
290
- {
291
- "verdict": "Outcome of the test",
292
- "description": "Description of the test",
293
- "resultCode": "Test identifier",
294
- "pointer?": "Element pointer in CSS notation",
295
- "htmlCode?": "Element html code",
296
- "attributes?": "Attributes of the element" // if available
297
- },
298
- { ... }
299
- ]
300
- },
301
- "...": { ... }
302
- }
303
- },
304
- "best-practices": {
305
- "type": "best-practices",
306
- "metadata": {
307
- "passed": "number of passed best practices",
308
- "warning": "number of warning best practices",
309
- "failed": "number of failed best practices",
310
- "inapplicable": "number of inapplicable best practices",
311
- },
312
- "assertions": {
313
- "QW_BP1": {
314
- "name": "Name of the technique",
315
- "code": "QualWeb best practices id",
316
- "description": "Description of the best practices",
317
- "metadata": {
318
- "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
319
- "success-criteria?": [
320
- {
321
- "name": "Name of the success criteria",
322
- "level": "Level of conformance of the success criteria",
323
- "principle": "Principle of the success criteria",
324
- "url": "Url of the success criteria"
325
- }
326
- ],
327
- "related?": [], // related WCAG 2.1 techniques
328
- "passed": "Number of passed results",
329
- "warning": "Number of warning results",
330
- "failed": "Number ff failed results",
331
- "type?": [], // usually "ACTRule" or "TestCase"
332
- "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
333
- "outcome": "Outcome of the best practices",
334
- "description": "Description of the outcome";
335
- },
336
- "results": [
337
- {
338
- "verdict": "Outcome of the test",
339
- "description": "Description of the test",
340
- "resultCode": "Test identifier",
341
- "pointer?": "Element pointer in CSS notation",
342
- "htmlCode?": "Element html code",
343
- "attributes?": "Attributes of the element" // if available
344
- },
345
- { ... }
346
- ]
347
- },
348
- "...": { ... }
349
- }
350
- },
351
- "counter": {
352
- "type": "counter",
353
- "data": {
354
- "roles": {
355
- "button": 2,
356
- "link": 4,
357
- ...
358
- },
359
- "tags": {
360
- "div": 10,
361
- "table": 3,
362
- ...
363
- }
364
- }
365
- }
366
- }
367
- }
368
- ```
369
-
370
- ## Implemented ACT Rules
371
-
372
- | QualWeb Rule ID | ACT Rule ID | ACT Rule Name |
373
- | --------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- |
374
- | QW-ACT-R1 | [2779a5](https://act-rules.github.io/rules/2779a5) | HTML Page has a title |
375
- | QW-ACT-R2 | [b5c3f8](https://act-rules.github.io/rules/b5c3f8) | HTML has lang attribute |
376
- | QW-ACT-R3 | [5b7ae0](https://act-rules.github.io/rules/5b7ae0) | HTML lang and xml:lang match |
377
- | QW-ACT-R4 | [bc659a](https://act-rules.github.io/rules/bc659a) | Meta-refresh no delay |
378
- | QW-ACT-R5 | [bf051a](https://act-rules.github.io/rules/bf051a) | Validity of HTML Lang attribute |
379
- | QW-ACT-R6 | [59796f](https://act-rules.github.io/rules/59796f) | Image button has accessible name |
380
- | QW-ACT-R7 | [b33eff](https://act-rules.github.io/rules/b33eff) | Orientation of the page is not restricted using CSS transform property |
381
- | QW-ACT-R9 | [b20e66](https://act-rules.github.io/rules/b20e66) | Links with identical accessible names have equivalent purpose |
382
- | QW-ACT-R10 | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) | `iframe` elements with identical accessible names have equivalent purpose |
383
- | QW-ACT-R11 | [97a4e1](https://act-rules.github.io/rules/97a4e1) | Button has accessible name |
384
- | QW-ACT-R12 | [c487ae](https://act-rules.github.io/rules/c487ae) | Link has accessible name |
385
- | QW-ACT-R13 | [6cfa84](https://act-rules.github.io/rules/6cfa84) | Element with `aria-hidden` has no focusable content |
386
- | QW-ACT-R14 | [b4f0c3](https://act-rules.github.io/rules/b4f0c3) | meta viewport does not prevent zoom |
387
- | QW-ACT-R15 | [80f0bf](https://act-rules.github.io/rules/80f0bf) | audio or video has no audio that plays automatically |
388
- | QW-ACT-R16 | [e086e5](https://act-rules.github.io/rules/e086e5) | Form control has accessible name |
389
- | QW-ACT-R17 | [23a2a8](https://act-rules.github.io/rules/23a2a8) | Image has accessible name |
390
- | QW-ACT-R18 | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | `id` attribute value is unique |
391
- | QW-ACT-R19 | [cae760](https://act-rules.github.io/rules/cae760) | iframe element has accessible name |
392
- | QW-ACT-R20 | [674b10](https://act-rules.github.io/rules/674b10) | role attribute has valid value |
393
- | QW-ACT-R21 | [7d6734](https://act-rules.github.io/rules/7d6734) | svg element with explicit role has accessible name |
394
- | QW-ACT-R22 | [de46e4](https://act-rules.github.io/rules/de46e4) | Element within body has valid lang attribute |
395
- | QW-ACT-R23 | [c5a4ea](https://act-rules.github.io/rules/c5a4ea) | video element visual content has accessible alternative |
396
- | QW-ACT-R24 | [73f2c2](https://act-rules.github.io/rules/73f2c2) | autocomplete attribute has valid value |
397
- | QW-ACT-R25 | [5c01ea](https://act-rules.github.io/rules/5c01ea) | ARIA state or property is permitted |
398
- | QW-ACT-R26 | [eac66b](https://act-rules.github.io/rules/eac66b) | video element auditory content has accessible alternative |
399
- | QW-ACT-R27 | [5f99a7](https://act-rules.github.io/rules/5f99a7) | This rule checks that each aria- attribute specified is defined in ARIA 1.1. |
400
- | QW-ACT-R28 | [4e8ab6](https://act-rules.github.io/rules/4e8ab6) | Element with role attribute has required states and properties |
401
- | QW-ACT-R29 | [e7aa44](https://act-rules.github.io/rules/e7aa44) | Audio element content has text alternative |
402
- | QW-ACT-R30 | [2ee8b8](https://act-rules.github.io/rules/2ee8b8) | Visible label is part of accessible name |
403
- | QW-ACT-R31 | [c3232f](https://act-rules.github.io/rules/c3232f) | Video element visual-only content has accessible alternative |
404
- | QW-ACT-R32 | [1ec09b](https://act-rules.github.io/rules/1ec09b) | video element visual content has strict accessible alternative |
405
- | QW-ACT-R33 | [ff89c9](https://act-rules.github.io/rules/ff89c9) | ARIA required context role |
406
- | QW-ACT-R34 | [6a7281](https://act-rules.github.io/rules/6a7281) | ARIA state or property has valid value |
407
- | QW-ACT-R35 | [ffd0e9](https://act-rules.github.io/rules/ffd0e9) | Heading has accessible name |
408
- | QW-ACT-R36 | [a25f45](https://act-rules.github.io/rules/a25f45) | Headers attribute specified on a cell refers to cells in the same table element |
409
- | QW-ACT-R37 | [afw4f7](https://act-rules.github.io/rules/afw4f7) | Text has minimum contrast |
410
- | QW-ACT-R38 | [bc4a75](https://act-rules.github.io/rules/bc4a75) | ARIA required owned elements |
411
- | QW-ACT-R39 | [d0f69e](https://act-rules.github.io/rules/d0f69e) | All table header cells have assigned data cells |
412
- | QW-ACT-R40 | [59br37](https://act-rules.github.io/rules/59br37) | Zoomed text node is not clipped with CSS overflow |
413
- | QW-ACT-R41 | [36b590](https://act-rules.github.io/rules/36b590) | Error message describes invalid form field value |
414
- | QW-ACT-R42 | [8fc3b6](https://act-rules.github.io/rules/8fc3b6) | Object element has non-empty accessible name |
415
- | QW-ACT-R43 | [0ssw9k](https://act-rules.github.io/rules/0ssw9k) | Scrollable element is keyboard accessible |
416
- | QW-ACT-R44 | [fd3a94](https://act-rules.github.io/rules/fd3a94) | Links with identical accessible names and context serve equivalent purpose |
417
- | QW-ACT-R48 | [46ca7f](https://act-rules.github.io/rules/46ca7f) | Element marked as decorative is not exposed |
418
- | QW-ACT-R49 | [aaa1bf](https://act-rules.github.io/rules/aaa1bf) | Audio or video that plays automatically has no audio that lasts more than 3 seconds |
419
- | QW-ACT-R50 | [4c31df](https://act-rules.github.io/rules/4c31df) | Audio or video that plays automatically has a control mechanism |
420
- | QW-ACT-R51 | [fd26cf](https://act-rules.github.io/rules/fd26cf) | video element visual-only content is media alternative for text |
421
- | QW-ACT-R52 | [ac7dc6](https://act-rules.github.io/rules/ac7dc6) | video element visual-only content has description track |
422
- | QW-ACT-R53 | [ee13b5](https://act-rules.github.io/rules/ee13b5) | video element visual-only content has transcript |
423
- | QW-ACT-R54 | [d7ba54](https://act-rules.github.io/rules/d7ba54) | video element visual-only content has audio track alternative |
424
- | QW-ACT-R55 | [1ea59c](https://act-rules.github.io/rules/1ea59c) | video element visual content has audio description |
425
- | QW-ACT-R56 | [ab4d13](https://act-rules.github.io/rules/ab4d13) | video element content is media alternative for text |
426
- | QW-ACT-R57 | [f196ce](https://act-rules.github.io/rules/f196ce) | video element visual content has description track |
427
- | QW-ACT-R58 | [2eb176](https://act-rules.github.io/rules/2eb176) | audio element content has transcript |
428
- | QW-ACT-R59 | [afb423](https://act-rules.github.io/rules/afb423) | audio element content is media alternative for text |
429
- | QW-ACT-R60 | [f51b46](https://act-rules.github.io/rules/f51b46) | video element auditory content has captions |
430
- | QW-ACT-R61 | [1a02b0](https://act-rules.github.io/rules/1a02b0) | video element visual content has transcript |
431
- | QW-ACT-R62 | [oj04fd](https://act-rules.github.io/rules/oj04fd) | Element in sequential focus order has visible focus |
432
- | QW-ACT-R63 | [b40fd1](https://act-rules.github.io/rules/b40fd1) | Document has a landmark with non-repeated content |
433
- | QW-ACT-R64 | [047fe0](https://act-rules.github.io/rules/047fe0) | Document has heading for non-repeated content |
434
- | QW-ACT-R65 | [307n5z](https://act-rules.github.io/rules/307n5z) | Element with presentational children has no focusable content |
435
- | QW-ACT-R66 | [m6b1q3](https://act-rules.github.io/rules/m6b1q3) | Menuitem has non-empty accessible name |
436
- | QW-ACT-R67 | [24afc2](https://act-rules.github.io/rules/24afc2) | Letter spacing in style attributes is not !important |
437
- | QW-ACT-R68 | [78fd32](https://act-rules.github.io/rules/78fd32) | Line height in style attributes is not !important |
438
- | QW-ACT-R69 | [9e45ec](https://act-rules.github.io/rules/9e45ec) | Word spacing in style attributes is not !important |
439
- | QW-ACT-R70 | [akn7bn](https://act-rules.github.io/rules/akn7bn) | frame with negative tabindex has no interactive elements |
440
- | QW-ACT-R71 | [bisz58](https://act-rules.github.io/rules/bisz58) | `meta` element has no refresh delay (no exception) |
441
- | QW-ACT-R72 | [8a213c](https://act-rules.github.io/rules/8a213c) | First focusable element is link to non-repeated content |
442
- | QW-ACT-R73 | [3e12e1](https://act-rules.github.io/rules/3e12e1) | Block of repeated content is collapsible |
443
- | QW-ACT-R74 | [ye5d6e](https://act-rules.github.io/rules/ye5d6e) | Document has an instrument to move focus to non-repeated content |
444
- | QW-ACT-R75 | [cf77f2](https://act-rules.github.io/rules/cf77f2) | Bypass Blocks of Repeated Content |
445
- | QW-ACT-R76 | [09o5cg](https://act-rules.github.io/rules/09o5cg) | Text has enhanced contrast |
446
-
447
- ## Implemented WCAG 2.1 Techniques
448
-
449
- | QualWeb Technique ID | WCAG Technique ID | WCAG Technique Name |
450
- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
451
- | QW-WCAG-T1 | [H24](https://www.w3.org/WAI/WCAG21/Techniques/html/H24) | Providing text alternatives for the area elements of image maps |
452
- | QW-WCAG-T2 | [H39](https://www.w3.org/WAI/WCAG21/Techniques/html/H39) | Using caption elements to associate data table captions with data tables |
453
- | QW-WCAG-T3 | [H71](https://www.w3.org/WAI/WCAG21/Techniques/html/H71) | Providing a description for groups of form controls using fieldset and legend elements |
454
- | QW-WCAG-T4 | [H73](https://www.w3.org/WAI/WCAG21/Techniques/html/H73) | Using the summary attribute of the table element to give an overview of data tables |
455
- | QW-WCAG-T5 | [H36](https://www.w3.org/WAI/WCAG21/Techniques/html/H36) | Using alt attributes on images used as submit buttons |
456
- | QW-WCAG-T6 | [SCR20](https://www.w3.org/WAI/WCAG21/Techniques/client-side-script/SCR20) | Using both keyboard and other device-specific functions |
457
- | QW-WCAG-T7 | [H28](https://www.w3.org/WAI/WCAG21/Techniques/html/H28) | Providing definitions for abbreviations by using the abbr element |
458
- | QW-WCAG-T8 | [F30](https://www.w3.org/WAI/WCAG21/Techniques/failures/F30) | Failure of Success Criterion 1.1.1 and 1.2.1 due to using text alternatives that are not alternatives |
459
- | QW-WCAG-T9 | [G141](https://www.w3.org/WAI/WCAG21/Techniques/general/G141) | Organizing a page using headings |
460
- | QW-WCAG-T10 | [H2](https://www.w3.org/WAI/WCAG21/Techniques/html/H2) | Combining adjacent image and text links for the same resource |
461
- | QW-WCAG-T11 | [H35](https://www.w3.org/WAI/WCAG21/Techniques/html/H35) | Providing text alternatives on applet elements |
462
- | QW-WCAG-T12 | [F46](https://www.w3.org/WAI/WCAG21/Techniques/failures/F46) | Failure of Success Criterion 1.3.1 due to using th elements, caption elements, or non-empty summary attributes in layout tables |
463
- | QW-WCAG-T13 | [F47](https://www.w3.org/WAI/WCAG21/Techniques/failures/F47) | Failure of Success Criterion 2.2.2 due to using the blink element |
464
- | QW-WCAG-T14 | [H43](https://www.w3.org/WAI/WCAG21/Techniques/html/H43) | Using id and headers attributes to associate data cells with header cells in data tables |
465
- | QW-WCAG-T15 | [H59](https://www.w3.org/WAI/WCAG21/Techniques/html/H59) | Using the link element and navigation tools |
466
- | QW-WCAG-T16 | [H88](https://www.w3.org/WAI/WCAG21/Techniques/html/H88) | Using HTML according to spec |
467
- | QW-WCAG-T17 | [G162](https://www.w3.org/WAI/WCAG21/Techniques/general/G162) | Positioning labels to maximize predictability of relationships |
468
- | QW-WCAG-T18 | [H51](https://www.w3.org/WAI/WCAG21/Techniques/html/H51) | Using table markup to present tabular information |
469
- | QW-WCAG-T19 | [H32](https://www.w3.org/WAI/WCAG21/Techniques/html/H32) | Providing submit buttons |
470
- | QW-WCAG-T20 | [H33](https://www.w3.org/WAI/WCAG21/Techniques/html/H33) | Supplementing link text with the title attribute |
471
- | QW-WCAG-T21 | [F89](https://www.w3.org/WAI/WCAG21/Techniques/failures/F89) | Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link |
472
- | QW-WCAG-T22 | [F52](https://www.w3.org/WAI/WCAG21/Techniques/failures/F52) | Failure of Success Criterion 3.2.1 and 3.2.5 due to opening a new window as soon as a new page is loaded |
473
- | QW-WCAG-T23 | [G1](https://www.w3.org/WAI/WCAG21/Techniques/general/G1) | Adding a link at the top of each page that goes directly to the main content area |
474
- | QW-WCAG-T24 | [F55](https://www.w3.org/WAI/WCAG21/Techniques/failures/F55) | Failure of Success Criteria 2.1.1, 2.4.7, and 3.2.1 due to using script to remove focus when focus is received |
475
- | QW-WCAG-T25 | [H63](https://www.w3.org/WAI/WCAG21/Techniques/html/H63) | Using the scope attribute to associate header cells and data cells in data tables |
476
- | QW-WCAG-T26 | [F59](https://www.w3.org/WAI/WCAG21/Techniques/failures/F59) | Failure of Success Criterion 4.1.2 due to using script to make div or span a user interface control in HTML without providing a role for the control |
477
- | QW-WCAG-T27 | [F88](https://www.w3.org/WAI/WCAG21/Techniques/failures/F88) | Failure of Success Criterion 1.4.8 due to using text that is justified (aligned to both the left and the right margins) |
478
- | QW-WCAG-T28 | [C12](https://www.w3.org/WAI/WCAG21/Techniques/css/C12) [C13](https://www.w3.org/WAI/WCAG21/Techniques/css/C13) [C14](https://www.w3.org/WAI/WCAG21/Techniques/css/C14) | Using `percent, em, names` for font sizes |
479
- | QW-WCAG-T29 | [C19](https://www.w3.org/WAI/WCAG21/Techniques/css/C19) | Specifying alignment either to the left or right in CSS |
480
- | QW-WCAG-T30 | [F4](https://www.w3.org/WAI/WCAG21/Techniques/failures/F4) | Failure of Success Criterion 2.2.2 due to using text-decoration:blink without a mechanism to stop it in less than five seconds |
481
- | QW-WCAG-T31 | [F24](https://www.w3.org/WAI/WCAG21/Techniques/failures/F24) | Failure of Success Criterion 1.4.3, 1.4.6 and 1.4.8 due to specifying foreground colors without specifying background colors or vice versa |
482
- | QW-WCAG-T32 | [H48](https://www.w3.org/WAI/WCAG21/Techniques/html/H48) | Using ol, ul and dl for lists or groups of links |
483
-
484
- # Evaluation problems
485
-
486
- Sometimes, some webpages fail to evaluate, or the evaluation may take a really long time. Before creating an issue check the **error.log** file and verify that:
487
-
488
- - The URL is correct, and it uses http or https, or www, or both;
489
- - The webpage exists;
490
- - If using https, that the certificate is valid;
491
- - If you really want to evaluate the page with an invalid certificate, add "--ignore-certificate-errors" to the `args` in qualweb puppeteer launch options.
492
- - The webpage is not password protected;
493
- - The webpage is an [HTML Document](https://dom.spec.whatwg.org/#concept-document).
494
-
495
- # License
496
-
497
- ISC
1
+ # QualWeb core
2
+
3
+ The core allows you to perform automatic accessibility evaluations on web pages. It contains 3 evaluation modules:
4
+
5
+ - [@qualweb/act-rules](https://github.com/qualweb/act-rules)
6
+ - [@qualweb/wcag-techniques](https://github.com/qualweb/wcag-techniques)
7
+ - [@qualweb/best-practices](https://github.com/qualweb/best-practices)
8
+
9
+ You can also perform evaluations at [http://qualweb.di.fc.ul.pt/evaluator/](http://qualweb.di.fc.ul.pt/evaluator/), or by installing the [chrome extension](https://chrome.google.com/webstore/detail/qualweb-extension/ljgilomdnehokancdcbkmbndkkiggioc).
10
+
11
+ ## How to install
12
+
13
+ ```shell
14
+ $ npm i @qualweb/core --save
15
+ ```
16
+
17
+ ## How to run
18
+
19
+ ```javascript
20
+ 'use strict';
21
+
22
+ const { QualWeb, generateEARLReport } = require('@qualweb/core');
23
+
24
+ (async () => {
25
+ const plugins = {
26
+ // Check https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-adblocker
27
+ adBlock: true, // Default value = false
28
+ // Check https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth
29
+ stealth: true // Default value = false
30
+ };
31
+ const qualweb = new QualWeb(plugins);
32
+
33
+ const clusterOptions = {
34
+ maxConcurrency: 5, // Performs several urls evaluations at the same time - the higher the number given, more resources will be used. Default value = 1
35
+ timeout: 60 * 1000, // Timeout for loading page. Default value = 30 seconds
36
+ monitor: true // Displays urls information on the terminal. Default value = false
37
+ };
38
+
39
+ const launchOptions = {
40
+ ... // check https://github.com/puppeteer/puppeteer/blob/v10.1.0/docs/api.md#puppeteerlaunchoptions
41
+ // In most cases there's no need to give additional options. Just leave the field undefined
42
+ };
43
+
44
+ // Starts the QualWeb core engine
45
+ await qualweb.start(clusterOptions, launchOptions);
46
+
47
+ // QualWeb evaluation report
48
+ const qualwebOptions = {
49
+ url: 'https://act-rules.github.io/pages/about/',
50
+ ...
51
+ };
52
+
53
+ // Evaluates the given options - will only return after all urls have finished evaluating or resulted in an error
54
+ const reports = await qualweb.evaluate(qualwebOptions);
55
+
56
+ console.log(reports);
57
+ // {
58
+ // "url": "report",
59
+ // "url2": "report2"
60
+ // }
61
+
62
+ // Stops the QualWeb core engine
63
+ await qualweb.stop();
64
+
65
+ const earlOptions = {
66
+ // Check the options in the section below
67
+ };
68
+
69
+ // if you want an EARL report
70
+ const earlReports = generateEARLReport(reports, earlOptions);
71
+
72
+ console.log(earlReports);
73
+ // {
74
+ // "url": "earlReport",
75
+ // "url2": "earlReport2"
76
+ // }
77
+ })();
78
+ ```
79
+
80
+ ## Options
81
+
82
+ The available options fot the **evaluate()** function are:
83
+
84
+ ```jsonc
85
+ {
86
+ "url": "https://act-rules.github.io/pages/about/", // url to evaluate
87
+ "urls": ["https://act-rules.github.io/pages/about/", "https://act-rules.github.io/rules/"], // Array of urls
88
+ "file": "/path/to/file/with/urls", // urls must be separated by a newline (\n)
89
+ "crawl": "https://act-rules.github.io", // Domain to crawl and obtain the urls
90
+ "html": "<html-code>", // Full webpage html, or just small snippets
91
+ "log": {
92
+ "file": true, // Logs errors to a file. Default value = false
93
+ "console": false // Logs errors to the console. Default value = false
94
+ },
95
+ "viewport": {
96
+ "mobile": false, // default value = false
97
+ "landscape": true, // default value = viewPort.width > viewPort.height
98
+ "userAgent": "custom user agent", // default value for desktop = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0', default value for mobile = 'Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
99
+ "resolution": {
100
+ "width": 1920, // default value for desktop = 1366, default value for mobile = 1080
101
+ "height": 1080 // default value for desktop = 768, default value for mobile = 1920
102
+ }
103
+ },
104
+ "waitUntil": ["load", "networkidle0"], // Events to wait before starting evaluation, default value = "load". For more check https://github.com/puppeteer/puppeteer/blob/v10.1.0/docs/api.md#pagegotourl-options
105
+ "validator": "http://127.0.0.1/validate", // HTML validator service endpoint. The url will be attached after of the given endpoint
106
+ "crawlOptions": {
107
+ "maxDepth": 2, // max depth to search, 0 to search only the given domain. Default value = -1 (search everything)
108
+ "maxUrls": 100, // max urls to find. Default value = -1 (search everything)
109
+ "timeout": 60, // how many seconds the domain should be crawled before it ends. Default value = -1 (never stops)
110
+ "maxParallelCrawls": 10, // max urls to crawl at the same time. Default value = 5
111
+ "logging": true // logs domain, current depth, urls found and time passed to the terminal
112
+ },
113
+ "translate": "en", // OR { "translate": "en", "fallback": "en" } OR { own translation object } check https://github.com/qualweb/locale#readme. Default = "en"
114
+ "execute": {
115
+ // choose which modules to execute
116
+ "wappalyzer": false, // wappalyzer module (https://github.com/qualweb/wappalyzer) - default value = false
117
+ "act": true, // act-rules module (https://github.com/qualweb/act-rules) - default value = true
118
+ "wcag": true, // wcag-techniques module (https://github.com/qualweb/wcag-techniques) - default value = true
119
+ "bp": false, // best-practices module (https://github.com/qualweb/best-practices) - default value = true
120
+ "counter": false // counter module (https://github.com/qualweb/counter) - default value = false
121
+ },
122
+ "act-rules": {
123
+ // More information about this options at https://github.com/qualweb/act-rules
124
+ "rules": ["QW-ACT-R1", "b5c3f8"], // Array of rules to execute, can be passed the QualWeb Rule ID or the ACT Rule ID
125
+ "exclude": ["QW-ACT-R1", "b5c3f8"], // Array of rules to exclude, can be passed the QualWeb Rule ID or the ACT Rule ID
126
+ "levels": ["A", "AA", "AAA"], // Conformance levels to execute,
127
+ "principles": ["Perceivable", "Operable", "Understandable", "Robust"] // Principles to execute
128
+ },
129
+ "wcag-techniques": {
130
+ // More information about this options at https://github.com/qualweb/wcag-techniques
131
+ "rules": ["QW-WCAG-T1", "H39"], // Array of techniques to execute, can be passed the QualWeb Technique ID or the WCAG 2.1 Technique Code
132
+ "exclude": ["QW-WCAG-T1", "H39"], // Array of techniques to exclude, can be passed the QualWeb Technique ID or the WCAG 2.1 Technique Code
133
+ "levels": ["A", "AA", "AAA"], // Conformance levels to execute,
134
+ "principles": ["Perceivable", "Operable", "Understandable", "Robust"] // Principles to execute
135
+ },
136
+ "best-practices": {
137
+ // More information about this options at https://github.com/qualweb/best-practices
138
+ "bestPractices": ["QW-BP1", "QW-BP2"], // Array of best practices to execute
139
+ "exclude": ["QW-BP1", "QW-BP2"] // Array of best practices to exclude
140
+ }
141
+ }
142
+ ```
143
+
144
+ The available options fot the **generateEARLReport()** function are:
145
+
146
+ ```jsonc
147
+ {
148
+ "aggregated": true, // default value = false
149
+ "aggregatedName": "websites.json", // The name to save the aggregated earl reports. default value = first url of the list
150
+ "modules": {
151
+ // Choose which modules to convert the report to earl, by default all modules are converted if they were executed
152
+ "act": true, // default value = true
153
+ "wcag": false, // default value = true
154
+ "best-practices": false // default value = true
155
+ } // If the "modules" value is given, any missing module value missing it's automatically set to false
156
+ }
157
+ ```
158
+
159
+ ## Report details
160
+
161
+ In this section it's explained the evaluation report in detail. For a detailed version of the EARL report check [@qualweb/earl-reporter](https://github.com/qualweb/earl-reporter#report-details).
162
+
163
+ ```jsonc
164
+ {
165
+ "type": "evaluation",
166
+ "system": {
167
+ "name": "QualWeb",
168
+ "description": "QualWeb is an automatic accessibility evaluator for webpages.",
169
+ "version": "QualWeb version",
170
+ "homepage": "http://www.qualweb.di.fc.ul.pt/",
171
+ "date": "date of the evaluation",
172
+ "hash": "unique hash",
173
+ "url": {
174
+ "inputUrl": "inserted url",
175
+ "protocol": "protocol of the url",
176
+ "domainName": "domain name of the url",
177
+ "domain": "domain of the url",
178
+ "uri": "uri of the url",
179
+ "completeUrl": "complete url after all redirects"
180
+ },
181
+ "page": {
182
+ "viewport": {
183
+ "mobile": "was evaluated on a mobile context or not",
184
+ "landscape": "was evaluated on a landscape context or not",
185
+ "userAgent": "user agent used",
186
+ "resolution": {
187
+ "width": "window's width used",
188
+ "height": "window's height used",
189
+ }
190
+ },
191
+ "dom": {
192
+ "html": "html code as a string",
193
+ "title": "Title of the webpage",
194
+ "elementCount": "Element count of the webpage"
195
+ }
196
+ }
197
+ },
198
+ "metadata": {
199
+ "passed": "number of passed rules/techniques/best practices",
200
+ "warning": "number of warning rules/techniques/best practices",
201
+ "failed": "number of failed rules/techniques/best practices",
202
+ "inapplicable": "number of inapplicable rules/techniques/best practices",
203
+ },
204
+ "modules": {
205
+ "act-rules": {
206
+ "type": "act-rules",
207
+ "metadata": {
208
+ "passed": "number of passed rules",
209
+ "warning": "number of warning rules",
210
+ "failed": "number of failed rules",
211
+ "inapplicable": "number of inapplicable rules",
212
+ },
213
+ "assertions": {
214
+ "QW_ACT_R1": {
215
+ "name": "Name of the rule",
216
+ "code": "QualWeb rule id",
217
+ "mapping": "ACT rule id mapping",
218
+ "description": "Description of the rule",
219
+ "metadata": {
220
+ "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
221
+ "success-criteria?": [
222
+ {
223
+ "name": "Name of the success criteria",
224
+ "level": "Level of conformance of the success criteria",
225
+ "principle": "Principle of the success criteria",
226
+ "url": "Url of the success criteria"
227
+ }
228
+ ],
229
+ "related?": [], // related WCAG 2.1 techniques
230
+ "url?": "Url of the rule",
231
+ "passed": "Number of passed results",
232
+ "warning": "Number of warning results",
233
+ "failed": "Number ff failed results",
234
+ "type?": [], // usually "ACTRule" or "TestCase"
235
+ "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
236
+ "outcome": "Outcome of the rule",
237
+ "description": "Description of the outcome";
238
+ },
239
+ "results": [
240
+ {
241
+ "verdict": "Outcome of the test",
242
+ "description": "Description of the test",
243
+ "resultCode": "Test identifier",
244
+ "pointer?": "Element pointer in CSS notation",
245
+ "htmlCode?": "Element html code",
246
+ "attributes?": "Attributes of the element",
247
+ "accessibleName?": "Accessible name of the test target"
248
+ },
249
+ { ... }
250
+ ]
251
+ },
252
+ "...": { ... }
253
+ }
254
+ },
255
+ "wcag-techniques": {
256
+ "type": "wcag-techniques",
257
+ "metadata": {
258
+ "passed": "number of passed techniques",
259
+ "warning": "number of warning techniques",
260
+ "failed": "number of failed techniques",
261
+ "inapplicable": "number of inapplicable techniques",
262
+ },
263
+ "assertions": {
264
+ "QW_WCAG_T1": {
265
+ "name": "Name of the technique",
266
+ "code": "QualWeb technique id",
267
+ "mapping": "WCAG techniques code mapping",
268
+ "description": "Description of the technique",
269
+ "metadata": {
270
+ "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
271
+ "success-criteria?": [
272
+ {
273
+ "name": "Name of the success criteria",
274
+ "level": "Level of conformance of the success criteria",
275
+ "principle": "Principle of the success criteria",
276
+ "url": "Url of the success criteria"
277
+ }
278
+ ],
279
+ "related?": [], // related WCAG 2.1 techniques
280
+ "url?": "Url of the technique",
281
+ "passed": "Number of passed results",
282
+ "warning": "Number of warning results",
283
+ "failed": "Number ff failed results",
284
+ "type?": [], // usually "ACTRule" or "TestCase"
285
+ "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
286
+ "outcome": "Outcome of the technique",
287
+ "description": "Description of the outcome";
288
+ },
289
+ "results": [
290
+ {
291
+ "verdict": "Outcome of the test",
292
+ "description": "Description of the test",
293
+ "resultCode": "Test identifier",
294
+ "pointer?": "Element pointer in CSS notation",
295
+ "htmlCode?": "Element html code",
296
+ "attributes?": "Attributes of the element" // if available
297
+ },
298
+ { ... }
299
+ ]
300
+ },
301
+ "...": { ... }
302
+ }
303
+ },
304
+ "best-practices": {
305
+ "type": "best-practices",
306
+ "metadata": {
307
+ "passed": "number of passed best practices",
308
+ "warning": "number of warning best practices",
309
+ "failed": "number of failed best practices",
310
+ "inapplicable": "number of inapplicable best practices",
311
+ },
312
+ "assertions": {
313
+ "QW_BP1": {
314
+ "name": "Name of the technique",
315
+ "code": "QualWeb best practices id",
316
+ "description": "Description of the best practices",
317
+ "metadata": {
318
+ "target": "Any target, can be one element, multiple elements, attributes, a relation between elements",
319
+ "success-criteria?": [
320
+ {
321
+ "name": "Name of the success criteria",
322
+ "level": "Level of conformance of the success criteria",
323
+ "principle": "Principle of the success criteria",
324
+ "url": "Url of the success criteria"
325
+ }
326
+ ],
327
+ "related?": [], // related WCAG 2.1 techniques
328
+ "passed": "Number of passed results",
329
+ "warning": "Number of warning results",
330
+ "failed": "Number ff failed results",
331
+ "type?": [], // usually "ACTRule" or "TestCase"
332
+ "a11yReq?": [], // WCAG 2.1 relation - something like "WCAG21:language"
333
+ "outcome": "Outcome of the best practices",
334
+ "description": "Description of the outcome";
335
+ },
336
+ "results": [
337
+ {
338
+ "verdict": "Outcome of the test",
339
+ "description": "Description of the test",
340
+ "resultCode": "Test identifier",
341
+ "pointer?": "Element pointer in CSS notation",
342
+ "htmlCode?": "Element html code",
343
+ "attributes?": "Attributes of the element" // if available
344
+ },
345
+ { ... }
346
+ ]
347
+ },
348
+ "...": { ... }
349
+ }
350
+ },
351
+ "counter": {
352
+ "type": "counter",
353
+ "data": {
354
+ "roles": {
355
+ "button": 2,
356
+ "link": 4,
357
+ ...
358
+ },
359
+ "tags": {
360
+ "div": 10,
361
+ "table": 3,
362
+ ...
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ ```
369
+
370
+ ## Implemented ACT Rules
371
+
372
+ | QualWeb Rule ID | ACT Rule ID | ACT Rule Name |
373
+ | --------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- |
374
+ | QW-ACT-R1 | [2779a5](https://act-rules.github.io/rules/2779a5) | HTML Page has a title |
375
+ | QW-ACT-R2 | [b5c3f8](https://act-rules.github.io/rules/b5c3f8) | HTML has lang attribute |
376
+ | QW-ACT-R3 | [5b7ae0](https://act-rules.github.io/rules/5b7ae0) | HTML lang and xml:lang match |
377
+ | QW-ACT-R4 | [bc659a](https://act-rules.github.io/rules/bc659a) | Meta-refresh no delay |
378
+ | QW-ACT-R5 | [bf051a](https://act-rules.github.io/rules/bf051a) | Validity of HTML Lang attribute |
379
+ | QW-ACT-R6 | [59796f](https://act-rules.github.io/rules/59796f) | Image button has accessible name |
380
+ | QW-ACT-R7 | [b33eff](https://act-rules.github.io/rules/b33eff) | Orientation of the page is not restricted using CSS transform property |
381
+ | QW-ACT-R9 | [b20e66](https://act-rules.github.io/rules/b20e66) | Links with identical accessible names have equivalent purpose |
382
+ | QW-ACT-R10 | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) | `iframe` elements with identical accessible names have equivalent purpose |
383
+ | QW-ACT-R11 | [97a4e1](https://act-rules.github.io/rules/97a4e1) | Button has accessible name |
384
+ | QW-ACT-R12 | [c487ae](https://act-rules.github.io/rules/c487ae) | Link has accessible name |
385
+ | QW-ACT-R13 | [6cfa84](https://act-rules.github.io/rules/6cfa84) | Element with `aria-hidden` has no focusable content |
386
+ | QW-ACT-R14 | [b4f0c3](https://act-rules.github.io/rules/b4f0c3) | meta viewport does not prevent zoom |
387
+ | QW-ACT-R15 | [80f0bf](https://act-rules.github.io/rules/80f0bf) | audio or video has no audio that plays automatically |
388
+ | QW-ACT-R16 | [e086e5](https://act-rules.github.io/rules/e086e5) | Form control has accessible name |
389
+ | QW-ACT-R17 | [23a2a8](https://act-rules.github.io/rules/23a2a8) | Image has accessible name |
390
+ | QW-ACT-R18 | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) | `id` attribute value is unique |
391
+ | QW-ACT-R19 | [cae760](https://act-rules.github.io/rules/cae760) | iframe element has accessible name |
392
+ | QW-ACT-R20 | [674b10](https://act-rules.github.io/rules/674b10) | role attribute has valid value |
393
+ | QW-ACT-R21 | [7d6734](https://act-rules.github.io/rules/7d6734) | svg element with explicit role has accessible name |
394
+ | QW-ACT-R22 | [de46e4](https://act-rules.github.io/rules/de46e4) | Element within body has valid lang attribute |
395
+ | QW-ACT-R23 | [c5a4ea](https://act-rules.github.io/rules/c5a4ea) | video element visual content has accessible alternative |
396
+ | QW-ACT-R24 | [73f2c2](https://act-rules.github.io/rules/73f2c2) | autocomplete attribute has valid value |
397
+ | QW-ACT-R25 | [5c01ea](https://act-rules.github.io/rules/5c01ea) | ARIA state or property is permitted |
398
+ | QW-ACT-R26 | [eac66b](https://act-rules.github.io/rules/eac66b) | video element auditory content has accessible alternative |
399
+ | QW-ACT-R27 | [5f99a7](https://act-rules.github.io/rules/5f99a7) | This rule checks that each aria- attribute specified is defined in ARIA 1.1. |
400
+ | QW-ACT-R28 | [4e8ab6](https://act-rules.github.io/rules/4e8ab6) | Element with role attribute has required states and properties |
401
+ | QW-ACT-R29 | [e7aa44](https://act-rules.github.io/rules/e7aa44) | Audio element content has text alternative |
402
+ | QW-ACT-R30 | [2ee8b8](https://act-rules.github.io/rules/2ee8b8) | Visible label is part of accessible name |
403
+ | QW-ACT-R31 | [c3232f](https://act-rules.github.io/rules/c3232f) | Video element visual-only content has accessible alternative |
404
+ | QW-ACT-R32 | [1ec09b](https://act-rules.github.io/rules/1ec09b) | video element visual content has strict accessible alternative |
405
+ | QW-ACT-R33 | [ff89c9](https://act-rules.github.io/rules/ff89c9) | ARIA required context role |
406
+ | QW-ACT-R34 | [6a7281](https://act-rules.github.io/rules/6a7281) | ARIA state or property has valid value |
407
+ | QW-ACT-R35 | [ffd0e9](https://act-rules.github.io/rules/ffd0e9) | Heading has accessible name |
408
+ | QW-ACT-R36 | [a25f45](https://act-rules.github.io/rules/a25f45) | Headers attribute specified on a cell refers to cells in the same table element |
409
+ | QW-ACT-R37 | [afw4f7](https://act-rules.github.io/rules/afw4f7) | Text has minimum contrast |
410
+ | QW-ACT-R38 | [bc4a75](https://act-rules.github.io/rules/bc4a75) | ARIA required owned elements |
411
+ | QW-ACT-R39 | [d0f69e](https://act-rules.github.io/rules/d0f69e) | All table header cells have assigned data cells |
412
+ | QW-ACT-R40 | [59br37](https://act-rules.github.io/rules/59br37) | Zoomed text node is not clipped with CSS overflow |
413
+ | QW-ACT-R41 | [36b590](https://act-rules.github.io/rules/36b590) | Error message describes invalid form field value |
414
+ | QW-ACT-R42 | [8fc3b6](https://act-rules.github.io/rules/8fc3b6) | Object element has non-empty accessible name |
415
+ | QW-ACT-R43 | [0ssw9k](https://act-rules.github.io/rules/0ssw9k) | Scrollable element is keyboard accessible |
416
+ | QW-ACT-R44 | [fd3a94](https://act-rules.github.io/rules/fd3a94) | Links with identical accessible names and context serve equivalent purpose |
417
+ | QW-ACT-R48 | [46ca7f](https://act-rules.github.io/rules/46ca7f) | Element marked as decorative is not exposed |
418
+ | QW-ACT-R49 | [aaa1bf](https://act-rules.github.io/rules/aaa1bf) | Audio or video that plays automatically has no audio that lasts more than 3 seconds |
419
+ | QW-ACT-R50 | [4c31df](https://act-rules.github.io/rules/4c31df) | Audio or video that plays automatically has a control mechanism |
420
+ | QW-ACT-R51 | [fd26cf](https://act-rules.github.io/rules/fd26cf) | video element visual-only content is media alternative for text |
421
+ | QW-ACT-R52 | [ac7dc6](https://act-rules.github.io/rules/ac7dc6) | video element visual-only content has description track |
422
+ | QW-ACT-R53 | [ee13b5](https://act-rules.github.io/rules/ee13b5) | video element visual-only content has transcript |
423
+ | QW-ACT-R54 | [d7ba54](https://act-rules.github.io/rules/d7ba54) | video element visual-only content has audio track alternative |
424
+ | QW-ACT-R55 | [1ea59c](https://act-rules.github.io/rules/1ea59c) | video element visual content has audio description |
425
+ | QW-ACT-R56 | [ab4d13](https://act-rules.github.io/rules/ab4d13) | video element content is media alternative for text |
426
+ | QW-ACT-R57 | [f196ce](https://act-rules.github.io/rules/f196ce) | video element visual content has description track |
427
+ | QW-ACT-R58 | [2eb176](https://act-rules.github.io/rules/2eb176) | audio element content has transcript |
428
+ | QW-ACT-R59 | [afb423](https://act-rules.github.io/rules/afb423) | audio element content is media alternative for text |
429
+ | QW-ACT-R60 | [f51b46](https://act-rules.github.io/rules/f51b46) | video element auditory content has captions |
430
+ | QW-ACT-R61 | [1a02b0](https://act-rules.github.io/rules/1a02b0) | video element visual content has transcript |
431
+ | QW-ACT-R62 | [oj04fd](https://act-rules.github.io/rules/oj04fd) | Element in sequential focus order has visible focus |
432
+ | QW-ACT-R63 | [b40fd1](https://act-rules.github.io/rules/b40fd1) | Document has a landmark with non-repeated content |
433
+ | QW-ACT-R64 | [047fe0](https://act-rules.github.io/rules/047fe0) | Document has heading for non-repeated content |
434
+ | QW-ACT-R65 | [307n5z](https://act-rules.github.io/rules/307n5z) | Element with presentational children has no focusable content |
435
+ | QW-ACT-R66 | [m6b1q3](https://act-rules.github.io/rules/m6b1q3) | Menuitem has non-empty accessible name |
436
+ | QW-ACT-R67 | [24afc2](https://act-rules.github.io/rules/24afc2) | Letter spacing in style attributes is not !important |
437
+ | QW-ACT-R68 | [78fd32](https://act-rules.github.io/rules/78fd32) | Line height in style attributes is not !important |
438
+ | QW-ACT-R69 | [9e45ec](https://act-rules.github.io/rules/9e45ec) | Word spacing in style attributes is not !important |
439
+ | QW-ACT-R70 | [akn7bn](https://act-rules.github.io/rules/akn7bn) | frame with negative tabindex has no interactive elements |
440
+ | QW-ACT-R71 | [bisz58](https://act-rules.github.io/rules/bisz58) | `meta` element has no refresh delay (no exception) |
441
+ | QW-ACT-R72 | [8a213c](https://act-rules.github.io/rules/8a213c) | First focusable element is link to non-repeated content |
442
+ | QW-ACT-R73 | [3e12e1](https://act-rules.github.io/rules/3e12e1) | Block of repeated content is collapsible |
443
+ | QW-ACT-R74 | [ye5d6e](https://act-rules.github.io/rules/ye5d6e) | Document has an instrument to move focus to non-repeated content |
444
+ | QW-ACT-R75 | [cf77f2](https://act-rules.github.io/rules/cf77f2) | Bypass Blocks of Repeated Content |
445
+ | QW-ACT-R76 | [09o5cg](https://act-rules.github.io/rules/09o5cg) | Text has enhanced contrast |
446
+
447
+ ## Implemented WCAG 2.1 Techniques
448
+
449
+ | QualWeb Technique ID | WCAG Technique ID | WCAG Technique Name |
450
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
451
+ | QW-WCAG-T1 | [H24](https://www.w3.org/WAI/WCAG21/Techniques/html/H24) | Providing text alternatives for the area elements of image maps |
452
+ | QW-WCAG-T2 | [H39](https://www.w3.org/WAI/WCAG21/Techniques/html/H39) | Using caption elements to associate data table captions with data tables |
453
+ | QW-WCAG-T3 | [H71](https://www.w3.org/WAI/WCAG21/Techniques/html/H71) | Providing a description for groups of form controls using fieldset and legend elements |
454
+ | QW-WCAG-T4 | [H73](https://www.w3.org/WAI/WCAG21/Techniques/html/H73) | Using the summary attribute of the table element to give an overview of data tables |
455
+ | QW-WCAG-T5 | [H36](https://www.w3.org/WAI/WCAG21/Techniques/html/H36) | Using alt attributes on images used as submit buttons |
456
+ | QW-WCAG-T6 | [SCR20](https://www.w3.org/WAI/WCAG21/Techniques/client-side-script/SCR20) | Using both keyboard and other device-specific functions |
457
+ | QW-WCAG-T7 | [H28](https://www.w3.org/WAI/WCAG21/Techniques/html/H28) | Providing definitions for abbreviations by using the abbr element |
458
+ | QW-WCAG-T8 | [F30](https://www.w3.org/WAI/WCAG21/Techniques/failures/F30) | Failure of Success Criterion 1.1.1 and 1.2.1 due to using text alternatives that are not alternatives |
459
+ | QW-WCAG-T9 | [G141](https://www.w3.org/WAI/WCAG21/Techniques/general/G141) | Organizing a page using headings |
460
+ | QW-WCAG-T10 | [H2](https://www.w3.org/WAI/WCAG21/Techniques/html/H2) | Combining adjacent image and text links for the same resource |
461
+ | QW-WCAG-T11 | [H35](https://www.w3.org/WAI/WCAG21/Techniques/html/H35) | Providing text alternatives on applet elements |
462
+ | QW-WCAG-T12 | [F46](https://www.w3.org/WAI/WCAG21/Techniques/failures/F46) | Failure of Success Criterion 1.3.1 due to using th elements, caption elements, or non-empty summary attributes in layout tables |
463
+ | QW-WCAG-T13 | [F47](https://www.w3.org/WAI/WCAG21/Techniques/failures/F47) | Failure of Success Criterion 2.2.2 due to using the blink element |
464
+ | QW-WCAG-T14 | [H43](https://www.w3.org/WAI/WCAG21/Techniques/html/H43) | Using id and headers attributes to associate data cells with header cells in data tables |
465
+ | QW-WCAG-T15 | [H59](https://www.w3.org/WAI/WCAG21/Techniques/html/H59) | Using the link element and navigation tools |
466
+ | QW-WCAG-T16 | [H88](https://www.w3.org/WAI/WCAG21/Techniques/html/H88) | Using HTML according to spec |
467
+ | QW-WCAG-T17 | [G162](https://www.w3.org/WAI/WCAG21/Techniques/general/G162) | Positioning labels to maximize predictability of relationships |
468
+ | QW-WCAG-T18 | [H51](https://www.w3.org/WAI/WCAG21/Techniques/html/H51) | Using table markup to present tabular information |
469
+ | QW-WCAG-T19 | [H32](https://www.w3.org/WAI/WCAG21/Techniques/html/H32) | Providing submit buttons |
470
+ | QW-WCAG-T20 | [H33](https://www.w3.org/WAI/WCAG21/Techniques/html/H33) | Supplementing link text with the title attribute |
471
+ | QW-WCAG-T21 | [F89](https://www.w3.org/WAI/WCAG21/Techniques/failures/F89) | Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link |
472
+ | QW-WCAG-T22 | [F52](https://www.w3.org/WAI/WCAG21/Techniques/failures/F52) | Failure of Success Criterion 3.2.1 and 3.2.5 due to opening a new window as soon as a new page is loaded |
473
+ | QW-WCAG-T23 | [G1](https://www.w3.org/WAI/WCAG21/Techniques/general/G1) | Adding a link at the top of each page that goes directly to the main content area |
474
+ | QW-WCAG-T24 | [F55](https://www.w3.org/WAI/WCAG21/Techniques/failures/F55) | Failure of Success Criteria 2.1.1, 2.4.7, and 3.2.1 due to using script to remove focus when focus is received |
475
+ | QW-WCAG-T25 | [H63](https://www.w3.org/WAI/WCAG21/Techniques/html/H63) | Using the scope attribute to associate header cells and data cells in data tables |
476
+ | QW-WCAG-T26 | [F59](https://www.w3.org/WAI/WCAG21/Techniques/failures/F59) | Failure of Success Criterion 4.1.2 due to using script to make div or span a user interface control in HTML without providing a role for the control |
477
+ | QW-WCAG-T27 | [F88](https://www.w3.org/WAI/WCAG21/Techniques/failures/F88) | Failure of Success Criterion 1.4.8 due to using text that is justified (aligned to both the left and the right margins) |
478
+ | QW-WCAG-T28 | [C12](https://www.w3.org/WAI/WCAG21/Techniques/css/C12) [C13](https://www.w3.org/WAI/WCAG21/Techniques/css/C13) [C14](https://www.w3.org/WAI/WCAG21/Techniques/css/C14) | Using `percent, em, names` for font sizes |
479
+ | QW-WCAG-T29 | [C19](https://www.w3.org/WAI/WCAG21/Techniques/css/C19) | Specifying alignment either to the left or right in CSS |
480
+ | QW-WCAG-T30 | [F4](https://www.w3.org/WAI/WCAG21/Techniques/failures/F4) | Failure of Success Criterion 2.2.2 due to using text-decoration:blink without a mechanism to stop it in less than five seconds |
481
+ | QW-WCAG-T31 | [F24](https://www.w3.org/WAI/WCAG21/Techniques/failures/F24) | Failure of Success Criterion 1.4.3, 1.4.6 and 1.4.8 due to specifying foreground colors without specifying background colors or vice versa |
482
+ | QW-WCAG-T32 | [H48](https://www.w3.org/WAI/WCAG21/Techniques/html/H48) | Using ol, ul and dl for lists or groups of links |
483
+
484
+ # Evaluation problems
485
+
486
+ Sometimes, some webpages fail to evaluate, or the evaluation may take a really long time. Before creating an issue check the **error.log** file and verify that:
487
+
488
+ - The URL is correct, and it uses http or https, or www, or both;
489
+ - The webpage exists;
490
+ - If using https, that the certificate is valid;
491
+ - If you really want to evaluate the page with an invalid certificate, add "--ignore-certificate-errors" to the `args` in qualweb puppeteer launch options.
492
+ - The webpage is not password protected;
493
+ - The webpage is an [HTML Document](https://dom.spec.whatwg.org/#concept-document).
494
+
495
+ # License
496
+
497
+ ISC