axe-core 4.10.3-canary.3b8bdde → 4.10.3-canary.3eade11
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/README.md +4 -4
- package/axe.d.ts +51 -6
- package/axe.js +17157 -16915
- package/axe.min.js +2 -2
- package/locales/_template.json +7 -3
- package/locales/de.json +5 -1
- package/locales/ja.json +6 -6
- package/package.json +6 -6
- package/sri-history.json +3 -3
package/README.md
CHANGED
|
@@ -138,21 +138,21 @@ axe.configure({
|
|
|
138
138
|
Axe-core supports the following locales. Do note that since locales are contributed by our community, they are not guaranteed to include all translations needed in a release.
|
|
139
139
|
|
|
140
140
|
- Basque
|
|
141
|
+
- Chinese (Simplified)
|
|
142
|
+
- Chinese (Traditional)
|
|
141
143
|
- Danish
|
|
142
144
|
- Dutch
|
|
143
145
|
- French
|
|
144
146
|
- German
|
|
147
|
+
- Greek
|
|
145
148
|
- Hebrew
|
|
149
|
+
- Italian
|
|
146
150
|
- Japanese
|
|
147
151
|
- Korean
|
|
148
152
|
- Norwegian (Bokmål)
|
|
149
153
|
- Polish
|
|
150
154
|
- Portuguese (Brazilian)
|
|
151
155
|
- Spanish
|
|
152
|
-
- Greek
|
|
153
|
-
- Italian
|
|
154
|
-
- Simplified Chinese
|
|
155
|
-
- Traditional Chinese
|
|
156
156
|
|
|
157
157
|
## Updates & Security
|
|
158
158
|
|
package/axe.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ declare namespace axe {
|
|
|
155
155
|
toolOptions: RunOptions;
|
|
156
156
|
passes: Result[];
|
|
157
157
|
violations: Result[];
|
|
158
|
-
incomplete:
|
|
158
|
+
incomplete: IncompleteResult[];
|
|
159
159
|
inapplicable: Result[];
|
|
160
160
|
}
|
|
161
161
|
interface Result {
|
|
@@ -167,6 +167,9 @@ declare namespace axe {
|
|
|
167
167
|
tags: TagValue[];
|
|
168
168
|
nodes: NodeResult[];
|
|
169
169
|
}
|
|
170
|
+
interface IncompleteResult extends Result {
|
|
171
|
+
error?: Omit<RuleError, 'errorNode'>;
|
|
172
|
+
}
|
|
170
173
|
interface NodeResult {
|
|
171
174
|
html: string;
|
|
172
175
|
impact?: ImpactValue;
|
|
@@ -204,6 +207,21 @@ declare namespace axe {
|
|
|
204
207
|
fail: string | { [key: string]: string };
|
|
205
208
|
incomplete?: string | { [key: string]: string };
|
|
206
209
|
}
|
|
210
|
+
interface RuleError {
|
|
211
|
+
name: string;
|
|
212
|
+
message: string;
|
|
213
|
+
stack: string;
|
|
214
|
+
ruleId?: string;
|
|
215
|
+
method?: string;
|
|
216
|
+
cause?: SerialError;
|
|
217
|
+
errorNode?: SerialDqElement;
|
|
218
|
+
}
|
|
219
|
+
interface SerialError {
|
|
220
|
+
message: string;
|
|
221
|
+
stack: string;
|
|
222
|
+
name: string;
|
|
223
|
+
cause?: SerialError;
|
|
224
|
+
}
|
|
207
225
|
interface CheckLocale {
|
|
208
226
|
[key: string]: CheckMessages;
|
|
209
227
|
}
|
|
@@ -368,23 +386,25 @@ declare namespace axe {
|
|
|
368
386
|
frameContext: FrameContextObject;
|
|
369
387
|
}
|
|
370
388
|
|
|
371
|
-
interface RawCheckResult
|
|
389
|
+
interface RawCheckResult
|
|
390
|
+
extends Omit<CheckResult, 'relatedNodes' | 'impact'> {
|
|
372
391
|
relatedNodes?: Array<SerialDqElement | DqElement>;
|
|
392
|
+
impact?: ImpactValue;
|
|
373
393
|
}
|
|
374
394
|
|
|
375
|
-
interface RawNodeResult<T extends 'passed' | 'failed' | '
|
|
395
|
+
interface RawNodeResult<T extends 'passed' | 'failed' | 'cantTell'> {
|
|
376
396
|
node: SerialDqElement | DqElement;
|
|
377
397
|
any: RawCheckResult[];
|
|
378
398
|
all: RawCheckResult[];
|
|
379
399
|
none: RawCheckResult[];
|
|
380
|
-
impact: ImpactValue |
|
|
400
|
+
impact: ImpactValue | undefined;
|
|
381
401
|
result: T;
|
|
382
402
|
}
|
|
383
403
|
|
|
384
404
|
interface RawResult extends Omit<Result, 'nodes'> {
|
|
385
405
|
inapplicable: Array<never>;
|
|
386
406
|
passes: RawNodeResult<'passed'>[];
|
|
387
|
-
incomplete: RawNodeResult<'
|
|
407
|
+
incomplete: RawNodeResult<'cantTell'>[];
|
|
388
408
|
violations: RawNodeResult<'failed'>[];
|
|
389
409
|
pageLevel: boolean;
|
|
390
410
|
result: 'failed' | 'passed' | 'incomplete' | 'inapplicable';
|
|
@@ -408,6 +428,24 @@ declare namespace axe {
|
|
|
408
428
|
boundingClientRect: DOMRect;
|
|
409
429
|
}
|
|
410
430
|
|
|
431
|
+
type GridCell = VirtualNode[];
|
|
432
|
+
|
|
433
|
+
interface Grid {
|
|
434
|
+
container: VirtualNode | null;
|
|
435
|
+
cells: unknown; // opaque implementation detail
|
|
436
|
+
boundaries?: DOMRect;
|
|
437
|
+
toGridIndex(num: number): number;
|
|
438
|
+
getCellFromPoint(point: { x: number; y: number }): GridCell;
|
|
439
|
+
loopGridPosition(
|
|
440
|
+
gridPosition: DOMRect,
|
|
441
|
+
callback: (gridCell: GridCell, pos: { row: number; col: number }) => void
|
|
442
|
+
): void;
|
|
443
|
+
getGridPositionOfRect(
|
|
444
|
+
rect: { top: number; right: number; bottom: number; left: number },
|
|
445
|
+
margin?: number
|
|
446
|
+
): DOMRect;
|
|
447
|
+
}
|
|
448
|
+
|
|
411
449
|
interface CustomNodeSerializer<T = SerialDqElement> {
|
|
412
450
|
toSpec: (dqElm: DqElement) => T;
|
|
413
451
|
mergeSpecs: (nodeSpec: T, parentFrameSpec: T) => T;
|
|
@@ -443,7 +481,13 @@ declare namespace axe {
|
|
|
443
481
|
isLabelledShadowDomSelector: (
|
|
444
482
|
selector: unknown
|
|
445
483
|
) => selector is LabelledShadowDomSelector;
|
|
446
|
-
|
|
484
|
+
RuleError: new (options: {
|
|
485
|
+
error: Error;
|
|
486
|
+
ruleId?: string;
|
|
487
|
+
method?: string;
|
|
488
|
+
errorNode?: SerialDqElement;
|
|
489
|
+
}) => RuleError;
|
|
490
|
+
serializeError: (error: Error) => SerialError;
|
|
447
491
|
DqElement: DqElementConstructor;
|
|
448
492
|
uuid: (
|
|
449
493
|
options?: { random?: Uint8Array | Array<number> },
|
|
@@ -460,6 +504,7 @@ declare namespace axe {
|
|
|
460
504
|
interface Dom {
|
|
461
505
|
isFocusable: (node: Element | VirtualNode) => boolean;
|
|
462
506
|
isNativelyFocusable: (node: Element | VirtualNode) => boolean;
|
|
507
|
+
getNodeGrid: (node: Node | VirtualNode) => Grid;
|
|
463
508
|
}
|
|
464
509
|
|
|
465
510
|
type AccessibleTextOptions = {
|