@jrpool/kilotest 24.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +9 -0
- package/DEVELOPMENT.md +5860 -0
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/SERVICE.md +268 -0
- package/aceconfig.js +28 -0
- package/ai0BalanceForm/index.html +30 -0
- package/ai0BalanceForm/index.js +79 -0
- package/alerts.js +73 -0
- package/diagnoses/index.html +46 -0
- package/diagnoses/index.js +140 -0
- package/env.example +21 -0
- package/env.testaro +17 -0
- package/error.html +18 -0
- package/eslint.config.mjs +53 -0
- package/favicon.ico +0 -0
- package/index.html +39 -0
- package/index.js +639 -0
- package/issues/index.html +20 -0
- package/issues/index.js +173 -0
- package/job.json +100 -0
- package/manage/index.html +32 -0
- package/manage/index.js +22 -0
- package/package.json +38 -0
- package/pm2.config.js +15 -0
- package/reannotate/index.html +19 -0
- package/reannotate/index.js +39 -0
- package/reannotateForm/index.html +29 -0
- package/reannotateForm/index.js +114 -0
- package/recActionForm/index.html +33 -0
- package/recActionForm/index.js +49 -0
- package/reportHideForm/index.html +29 -0
- package/reportHideForm/index.js +89 -0
- package/reportIssue/index.html +38 -0
- package/reportIssue/index.js +181 -0
- package/reportIssues/index.html +47 -0
- package/reportIssues/index.js +259 -0
- package/reportUnhideForm/index.html +29 -0
- package/reportUnhideForm/index.js +89 -0
- package/reportsExpungeForm/index.html +29 -0
- package/reportsExpungeForm/index.js +105 -0
- package/reportsPruneForm/index.html +29 -0
- package/reportsPruneForm/index.js +105 -0
- package/reportsRewindForm/index.html +29 -0
- package/reportsRewindForm/index.js +105 -0
- package/retestRec/index.html +23 -0
- package/retestRec/index.js +19 -0
- package/retestRecForm/index.html +27 -0
- package/retestRecForm/index.js +36 -0
- package/rules/index.html +28 -0
- package/rules/index.js +71 -0
- package/style.css +196 -0
- package/targets/index.html +37 -0
- package/targets/index.js +170 -0
- package/testOrder/index.html +23 -0
- package/testOrder/index.js +62 -0
- package/testRec/index.html +23 -0
- package/testRec/index.js +25 -0
- package/testRecForm/index.html +34 -0
- package/testRecForm/index.js +22 -0
- package/tutorial/images/newsletter-form.png +0 -0
- package/tutorial/index.html +796 -0
- package/tutorial/index.js +53 -0
- package/util.js +686 -0
- package/wcagMap.json +102 -0
- package/wcagRenew/index.html +19 -0
- package/wcagRenew/index.js +70 -0
- package/wcagRenewForm/index.html +25 -0
- package/wcagRenewForm/index.js +22 -0
package/wcagMap.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"1.1": "text-alternatives",
|
|
3
|
+
"1.1.1": "non-text-content",
|
|
4
|
+
"1.2": "time-based-media",
|
|
5
|
+
"1.2.1": "audio-only-and-video-only-prerecorded",
|
|
6
|
+
"1.2.2": "captions-prerecorded",
|
|
7
|
+
"1.2.3": "audio-description-or-media-alternative-prerecorded",
|
|
8
|
+
"1.2.4": "captions-live",
|
|
9
|
+
"1.2.5": "audio-description-prerecorded",
|
|
10
|
+
"1.2.6": "sign-language-prerecorded",
|
|
11
|
+
"1.2.7": "extended-audio-description-prerecorded",
|
|
12
|
+
"1.2.8": "media-alternative-prerecorded",
|
|
13
|
+
"1.2.9": "audio-only-live",
|
|
14
|
+
"1.3": "adaptable",
|
|
15
|
+
"1.3.1": "info-and-relationships",
|
|
16
|
+
"1.3.2": "meaningful-sequence",
|
|
17
|
+
"1.3.3": "sensory-characteristics",
|
|
18
|
+
"1.3.4": "orientation",
|
|
19
|
+
"1.3.5": "identify-input-purpose",
|
|
20
|
+
"1.3.6": "identify-purpose",
|
|
21
|
+
"1.4": "distinguishable",
|
|
22
|
+
"1.4.1": "use-of-color",
|
|
23
|
+
"1.4.2": "audio-control",
|
|
24
|
+
"1.4.3": "contrast-minimum",
|
|
25
|
+
"1.4.4": "resize-text",
|
|
26
|
+
"1.4.5": "images-of-text",
|
|
27
|
+
"1.4.6": "contrast-enhanced",
|
|
28
|
+
"1.4.7": "low-or-no-background-audio",
|
|
29
|
+
"1.4.8": "visual-presentation",
|
|
30
|
+
"1.4.9": "images-of-text-no-exception",
|
|
31
|
+
"1.4.10": "reflow",
|
|
32
|
+
"1.4.11": "non-text-contrast",
|
|
33
|
+
"1.4.12": "text-spacing",
|
|
34
|
+
"1.4.13": "content-on-hover-or-focus",
|
|
35
|
+
"2.1": "keyboard-accessible",
|
|
36
|
+
"2.1.1": "keyboard",
|
|
37
|
+
"2.1.2": "no-keyboard-trap",
|
|
38
|
+
"2.1.3": "keyboard-no-exception",
|
|
39
|
+
"2.1.4": "character-key-shortcuts",
|
|
40
|
+
"2.2": "enough-time",
|
|
41
|
+
"2.2.1": "timing-adjustable",
|
|
42
|
+
"2.2.2": "pause-stop-hide",
|
|
43
|
+
"2.2.3": "no-timing",
|
|
44
|
+
"2.2.4": "interruptions",
|
|
45
|
+
"2.2.5": "re-authenticating",
|
|
46
|
+
"2.2.6": "timeouts",
|
|
47
|
+
"2.3": "seizures-and-physical-reactions",
|
|
48
|
+
"2.3.1": "three-flashes-or-below-threshold",
|
|
49
|
+
"2.3.2": "three-flashes",
|
|
50
|
+
"2.3.3": "animation-from-interactions",
|
|
51
|
+
"2.4": "navigable",
|
|
52
|
+
"2.4.1": "bypass-blocks",
|
|
53
|
+
"2.4.2": "page-titled",
|
|
54
|
+
"2.4.3": "focus-order",
|
|
55
|
+
"2.4.4": "link-purpose-in-context",
|
|
56
|
+
"2.4.5": "multiple-ways",
|
|
57
|
+
"2.4.6": "headings-and-labels",
|
|
58
|
+
"2.4.7": "focus-visible",
|
|
59
|
+
"2.4.8": "location",
|
|
60
|
+
"2.4.9": "link-purpose-link-only",
|
|
61
|
+
"2.4.10": "section-headings",
|
|
62
|
+
"2.4.11": "focus-not-obscured-minimum",
|
|
63
|
+
"2.4.12": "focus-not-obscured-enhanced",
|
|
64
|
+
"2.4.13": "focus-appearance",
|
|
65
|
+
"2.5": "input-modalities",
|
|
66
|
+
"2.5.1": "pointer-gestures",
|
|
67
|
+
"2.5.2": "pointer-cancellation",
|
|
68
|
+
"2.5.3": "label-in-name",
|
|
69
|
+
"2.5.4": "motion-actuation",
|
|
70
|
+
"2.5.5": "target-size-enhanced",
|
|
71
|
+
"2.5.6": "concurrent-input-mechanisms",
|
|
72
|
+
"2.5.7": "dragging-movements",
|
|
73
|
+
"2.5.8": "target-size-minimum",
|
|
74
|
+
"3.1": "readable",
|
|
75
|
+
"3.1.1": "language-of-page",
|
|
76
|
+
"3.1.2": "language-of-parts",
|
|
77
|
+
"3.1.3": "unusual-words",
|
|
78
|
+
"3.1.4": "abbreviations",
|
|
79
|
+
"3.1.5": "reading-level",
|
|
80
|
+
"3.1.6": "pronunciation",
|
|
81
|
+
"3.2": "predictable",
|
|
82
|
+
"3.2.1": "on-focus",
|
|
83
|
+
"3.2.2": "on-input",
|
|
84
|
+
"3.2.3": "consistent-navigation",
|
|
85
|
+
"3.2.4": "consistent-identification",
|
|
86
|
+
"3.2.5": "change-on-request",
|
|
87
|
+
"3.2.6": "consistent-help",
|
|
88
|
+
"3.3": "input-assistance",
|
|
89
|
+
"3.3.1": "error-identification",
|
|
90
|
+
"3.3.2": "labels-or-instructions",
|
|
91
|
+
"3.3.3": "error-suggestion",
|
|
92
|
+
"3.3.4": "error-prevention-legal-financial-data",
|
|
93
|
+
"3.3.5": "help",
|
|
94
|
+
"3.3.6": "error-prevention-all",
|
|
95
|
+
"3.3.7": "redundant-entry",
|
|
96
|
+
"3.3.8": "accessible-authentication-minimum",
|
|
97
|
+
"3.3.9": "accessible-authentication-enhanced",
|
|
98
|
+
"4.1": "compatible",
|
|
99
|
+
"4.1.1": "parsing",
|
|
100
|
+
"4.1.2": "name-role-value",
|
|
101
|
+
"4.1.3": "status-messages"
|
|
102
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-US">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="publisher" content="Jonathan Robert Pool">
|
|
7
|
+
<meta name="creator" content="Jonathan Robert Pool">
|
|
8
|
+
<meta name="keywords" content="report,accessibility,a11y">
|
|
9
|
+
<title>WCAG map renewed | Kilotest</title>
|
|
10
|
+
<link rel="icon" href="/favicon.ico">
|
|
11
|
+
<link rel="stylesheet" href="/style.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<main>
|
|
15
|
+
<h1><a href="/">Kilotest</a>: WCAG map renewed</h1>
|
|
16
|
+
<p>The WCAG map has been renewed.</p>
|
|
17
|
+
</main>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
index.js
|
|
3
|
+
Renews the WCAG map and serves an acknowledgment.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// IMPORTS
|
|
7
|
+
|
|
8
|
+
const fs = require('fs/promises');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const {getJSON} = require('../util');
|
|
11
|
+
|
|
12
|
+
// FUNCTIONS
|
|
13
|
+
|
|
14
|
+
// Renews the WCAG map and serves an acknowledgment.
|
|
15
|
+
exports.answer = async authCode => {
|
|
16
|
+
// If the authorization code is valid:
|
|
17
|
+
if (authCode === process.env.AUTH_CODE) {
|
|
18
|
+
// Get the map source response.
|
|
19
|
+
const mapSourceResponse = await fetch('https://www.w3.org/WAI/WCAG22/Understanding/');
|
|
20
|
+
const mapSourceStatus = mapSourceResponse.status;
|
|
21
|
+
// If the acquisition succeeded:
|
|
22
|
+
if (mapSourceStatus === 200) {
|
|
23
|
+
// Get the HTML of the map source page.
|
|
24
|
+
const mapSourceHTML = await mapSourceResponse.text();
|
|
25
|
+
// Get the entries from the HTML.
|
|
26
|
+
const mapEntries = mapSourceHTML.matchAll(
|
|
27
|
+
/<a href="([^"]+)"><span class="secno">([\d.]+) *<\/span>/g
|
|
28
|
+
);
|
|
29
|
+
// If there are entries:
|
|
30
|
+
if (mapEntries) {
|
|
31
|
+
// Initialize the WCAG map.
|
|
32
|
+
const wcagMap = {};
|
|
33
|
+
// For each entry:
|
|
34
|
+
for (const entry of mapEntries) {
|
|
35
|
+
// Add it to the map.
|
|
36
|
+
wcagMap[entry[2]] = entry[1];
|
|
37
|
+
}
|
|
38
|
+
// Save the map, replacing any existing one.
|
|
39
|
+
await fs.writeFile(path.join(__dirname, '..', 'wcagMap.json'), getJSON(wcagMap));
|
|
40
|
+
// Get the acknowledgment page.
|
|
41
|
+
const answerPage = await fs.readFile(path.join(__dirname, 'index.html'), 'utf8');
|
|
42
|
+
// Return it.
|
|
43
|
+
return {
|
|
44
|
+
status: 'ok',
|
|
45
|
+
answerPage
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Otherwise, i.e. if there are no entries:
|
|
49
|
+
else {
|
|
50
|
+
// Report this.
|
|
51
|
+
return {
|
|
52
|
+
status: 'error',
|
|
53
|
+
error: 'No entries found in WCAG map source'
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return {
|
|
59
|
+
status: 'error',
|
|
60
|
+
error: 'WCAG map source not retrieved'
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return {
|
|
66
|
+
status: 'error',
|
|
67
|
+
error: 'Authorization code invalid'
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-US">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="publisher" content="Jonathan Robert Pool">
|
|
7
|
+
<meta name="creator" content="Jonathan Robert Pool">
|
|
8
|
+
<meta name="keywords" content="report,accessibility,a11y">
|
|
9
|
+
<title>Renew WCAG map | Kilotest</title>
|
|
10
|
+
<link rel="icon" href="/favicon.ico">
|
|
11
|
+
<link rel="stylesheet" href="/style.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<main>
|
|
15
|
+
<h1><a href="/">Kilotest</a>: Renew WCAG map</h1>
|
|
16
|
+
<p>Submit this form to renew the map of WCAG numeric to text identifiers.</p>
|
|
17
|
+
<form action="/wcagRenew.html" method="post">
|
|
18
|
+
<p><label>
|
|
19
|
+
Authorization code: <input size="3" minLength="3" maxlength="3" name="authCode" required>
|
|
20
|
+
</label></p>
|
|
21
|
+
<p><button type="submit">Submit</button></p>
|
|
22
|
+
</form>
|
|
23
|
+
</main>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
index.js
|
|
3
|
+
Serves a form for renewing the WCAG map.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// IMPORTS
|
|
7
|
+
|
|
8
|
+
const fs = require('fs/promises');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
// FUNCTIONS
|
|
12
|
+
|
|
13
|
+
// Returns a form for renewing the WCAG map.
|
|
14
|
+
exports.answer = async () => {
|
|
15
|
+
// Get the map renewal form.
|
|
16
|
+
const answerPage = await fs.readFile(path.join(__dirname, 'index.html'), 'utf8');
|
|
17
|
+
// Return it.
|
|
18
|
+
return {
|
|
19
|
+
status: 'ok',
|
|
20
|
+
answerPage
|
|
21
|
+
};
|
|
22
|
+
};
|