Repository navigation
Expand file tree
/
Copy pathkeylens.config.schema.json
More file actions
278 lines (278 loc) · 9.28 KB
/
Copy pathkeylens.config.schema.json
File metadata and controls
278 lines (278 loc) · 9.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Keylens Configuration",
"description": "Configuration file for Keylens keyboard navigation testing.",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": { "type": "string" },
"profile": {
"type": "string",
"enum": ["fast", "balanced", "thorough"],
"default": "balanced",
"description": "Execution preset applied before explicit option overrides."
},
"url": {
"type": "string",
"format": "uri",
"description": "URL to audit (used only when no URL argument is passed on the CLI)."
},
"viewport": {
"type": "object",
"additionalProperties": false,
"properties": {
"width": { "type": "number", "exclusiveMinimum": 0, "default": 1280 },
"height": { "type": "number", "exclusiveMinimum": 0, "default": 720 }
}
},
"maxTabs": {
"type": "integer",
"minimum": 1,
"default": 500,
"description": "Max Tab presses before aborting."
},
"tabTimeout": {
"type": "number",
"exclusiveMinimum": 0,
"default": 3000
},
"waitForSelector": {
"type": "string",
"minLength": 1,
"description": "CSS selector to wait for before starting."
},
"waitAfterLoad": {
"type": "number",
"minimum": 0,
"default": 1000
},
"tabDelay": {
"type": "number",
"default": 250,
"minimum": 10,
"description": "Delay in ms between tab presses to let focus settle."
},
"rules": {
"type": "object",
"additionalProperties": false,
"properties": {
"keyboardTrap": { "type": "boolean", "default": true },
"unreachableElements": { "type": "boolean", "default": true },
"focusOrderMismatch": { "type": "boolean", "default": true },
"tabindexAbuse": { "type": "boolean", "default": true },
"missingFocusIndicator": { "type": "boolean", "default": true },
"skipLink": { "type": "boolean", "default": true },
"focusNotObscured": { "type": "boolean", "default": true },
"focusAfterInteraction": { "type": "boolean", "default": true },
"rovingTabindexBroken": { "type": "boolean", "default": true }
}
},
"reporters": {
"type": "array",
"items": {
"type": "string",
"enum": ["cli", "json", "html", "markdown"]
},
"default": ["cli"]
},
"outputDir": {
"type": "string",
"minLength": 1,
"default": "./keylens-report"
},
"outputFileName": {
"type": "string",
"minLength": 1,
"description": "Base file name (without extension) for report files. Defaults to \"keylens-report\"."
},
"appendTimestamp": {
"type": "boolean",
"default": true,
"description": "Append a \"-YYYY-MM-DDTHH-mm-ss\" timestamp to report file names so repeated runs don't overwrite each other."
},
"browser": {
"type": "string",
"enum": ["chromium", "firefox", "webkit"],
"default": "chromium"
},
"capture": {
"type": "object",
"additionalProperties": false,
"description": "Bounded screenshot capture policy. Programmatic audits default to no page screenshot.",
"properties": {
"page": {
"type": "string",
"enum": ["none", "viewport", "full"],
"default": "none"
},
"limits": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxDimension": {
"type": "integer",
"minimum": 1,
"default": 16384
},
"maxPixels": {
"type": "integer",
"minimum": 1,
"default": 40000000
},
"maxBytes": {
"type": "integer",
"minimum": 1,
"default": 52428800
}
}
}
}
},
"timeouts": {
"type": "object",
"additionalProperties": false,
"description": "Enforced wall-time budgets for audit phases.",
"properties": {
"total": { "type": "number", "exclusiveMinimum": 0 },
"crawl": { "type": "number", "exclusiveMinimum": 0 },
"rules": { "type": "number", "exclusiveMinimum": 0 },
"interactions": { "type": "number", "exclusiveMinimum": 0 },
"reporters": { "type": "number", "exclusiveMinimum": 0 }
}
},
"interactions": {
"type": "object",
"additionalProperties": false,
"description": "Bounded post-activation focus testing.",
"properties": {
"enabled": { "type": "boolean", "default": false },
"maxCases": { "type": "integer", "minimum": 0, "default": 20 },
"timeout": {
"type": "number",
"exclusiveMinimum": 0,
"default": 2000
},
"include": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"exclude": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"actions": {
"type": "array",
"items": { "enum": ["click", "enter", "space"] },
"default": ["click"]
},
"isolation": { "enum": ["reload", "none"], "default": "reload" },
"navigation": { "enum": ["block", "allow"], "default": "block" },
"excludeDestructive": { "type": "boolean", "default": true }
}
},
"navigationTimeout": {
"type": "number",
"exclusiveMinimum": 0,
"default": 30000,
"description": "Timeout in ms for page navigation (default: 30000)."
},
"headed": {
"type": "boolean",
"default": false
},
"prepare": {
"type": "object",
"additionalProperties": false,
"description": "Overlay/consent-banner dismissal run after navigation, before capture and crawl.",
"properties": {
"dismissOverlays": {
"type": "boolean",
"default": true,
"description": "Auto-detect and dismiss known cookie/consent banners (OneTrust, Cookiebot, etc.), falling back to a generic heuristic."
},
"consentPreference": {
"enum": ["reject", "accept", "close"],
"default": "reject",
"description": "Which action to prefer when a banner offers multiple choices."
},
"dismissSelectors": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"description": "Extra CSS selectors to click before auditing, for banners not covered by built-in presets."
},
"timeout": {
"type": "number",
"exclusiveMinimum": 0,
"default": 5000,
"description": "Whole-phase wall-time budget in ms."
},
"cookies": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "value"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"value": { "type": "string" },
"domain": { "type": "string", "minLength": 1 },
"path": { "type": "string", "minLength": 1 }
}
},
"description": "Cookies applied to the browser context before navigation."
},
"steps": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type", "selector"],
"properties": {
"type": { "const": "click" },
"selector": { "type": "string", "minLength": 1 },
"optional": { "type": "boolean" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "key"],
"properties": {
"type": { "const": "press" },
"key": { "type": "string", "minLength": 1 }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "ms"],
"properties": {
"type": { "const": "wait" },
"ms": { "type": "number", "minimum": 0 }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "selector"],
"properties": {
"type": { "const": "waitFor" },
"selector": { "type": "string", "minLength": 1 },
"timeout": { "type": "number", "exclusiveMinimum": 0 }
}
}
]
},
"description": "Generic scripted steps run after overlay dismissal (click/press/wait/waitFor)."
},
"expandScrollContainers": {
"type": "boolean",
"default": true,
"description": "Detect and neutralize full-page 'faux scroll' containers (overflow:auto wrappers used by parallax/smooth-scroll designs instead of the document itself) so page height, full-page screenshots, and the HTML focus map reflect the true page length."
}
}
}
}
}