axe-core 4.9.1 → 4.10.0-canary.0d03b0a
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/axe.d.ts +46 -10
- package/axe.js +814 -773
- package/axe.min.js +2 -2
- package/locales/README.md +3 -3
- package/locales/_template.json +106 -101
- package/locales/de.json +12 -5
- package/locales/ja.json +15 -7
- package/locales/ru.json +1123 -0
- package/package.json +14 -10
- package/sri-history.json +389 -381
package/axe.d.ts
CHANGED
|
@@ -70,16 +70,19 @@ declare namespace axe {
|
|
|
70
70
|
| LabelledShadowDomSelector
|
|
71
71
|
| LabelledFramesSelector;
|
|
72
72
|
type SelectorList = Array<Selector | FramesSelector> | NodeList;
|
|
73
|
+
type ContextProp = Selector | SelectorList;
|
|
73
74
|
type ContextObject =
|
|
74
75
|
| {
|
|
75
|
-
include:
|
|
76
|
-
exclude?:
|
|
76
|
+
include: ContextProp;
|
|
77
|
+
exclude?: ContextProp;
|
|
77
78
|
}
|
|
78
79
|
| {
|
|
79
|
-
exclude:
|
|
80
|
-
include?:
|
|
80
|
+
exclude: ContextProp;
|
|
81
|
+
include?: ContextProp;
|
|
81
82
|
};
|
|
82
|
-
type
|
|
83
|
+
type ContextSpec = ContextProp | ContextObject;
|
|
84
|
+
/** Synonym to ContextSpec */
|
|
85
|
+
type ElementContext = ContextSpec;
|
|
83
86
|
|
|
84
87
|
type SerialSelector =
|
|
85
88
|
| BaseSelector
|
|
@@ -140,10 +143,14 @@ declare namespace axe {
|
|
|
140
143
|
iframes?: boolean;
|
|
141
144
|
elementRef?: boolean;
|
|
142
145
|
frameWaitTime?: number;
|
|
143
|
-
preload?: boolean;
|
|
146
|
+
preload?: boolean | PreloadOptions;
|
|
144
147
|
performanceTimer?: boolean;
|
|
145
148
|
pingWaitTime?: number;
|
|
146
149
|
}
|
|
150
|
+
interface PreloadOptions {
|
|
151
|
+
assets: string[];
|
|
152
|
+
timeout?: number;
|
|
153
|
+
}
|
|
147
154
|
interface AxeResults extends EnvironmentData {
|
|
148
155
|
toolOptions: RunOptions;
|
|
149
156
|
passes: Result[];
|
|
@@ -335,6 +342,9 @@ declare namespace axe {
|
|
|
335
342
|
interface DqElement extends SerialDqElement {
|
|
336
343
|
element: Element;
|
|
337
344
|
toJSON(): SerialDqElement;
|
|
345
|
+
}
|
|
346
|
+
interface DqElementConstructor {
|
|
347
|
+
new (elm: Element, options?: { absolutePaths?: boolean }): DqElement;
|
|
338
348
|
mergeSpecs(
|
|
339
349
|
childSpec: SerialDqElement,
|
|
340
350
|
parentSpec: SerialDqElement
|
|
@@ -398,6 +408,24 @@ declare namespace axe {
|
|
|
398
408
|
boundingClientRect: DOMRect;
|
|
399
409
|
}
|
|
400
410
|
|
|
411
|
+
interface CustomNodeSerializer<T = SerialDqElement> {
|
|
412
|
+
toSpec: (dqElm: DqElement) => T;
|
|
413
|
+
mergeSpecs: (nodeSpec: T, parentFrameSpec: T) => T;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
interface NodeSerializer {
|
|
417
|
+
update: <T>(serializer: CustomNodeSerializer<T>) => void;
|
|
418
|
+
toSpec: (node: Element | VirtualNode) => SerialDqElement;
|
|
419
|
+
dqElmToSpec: (
|
|
420
|
+
dqElm: DqElement | SerialDqElement,
|
|
421
|
+
options?: RunOptions
|
|
422
|
+
) => SerialDqElement;
|
|
423
|
+
mergeSpecs: (
|
|
424
|
+
nodeSpec: SerialDqElement,
|
|
425
|
+
parentFrameSpec: SerialDqElement
|
|
426
|
+
) => SerialDqElement;
|
|
427
|
+
}
|
|
428
|
+
|
|
401
429
|
interface Utils {
|
|
402
430
|
getFrameContexts: (
|
|
403
431
|
context?: ElementContext,
|
|
@@ -406,15 +434,23 @@ declare namespace axe {
|
|
|
406
434
|
shadowSelect: (selector: CrossTreeSelector) => Element | null;
|
|
407
435
|
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
|
|
408
436
|
getStandards(): Required<Standards>;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
437
|
+
isContextSpec: (context: unknown) => context is ContextSpec;
|
|
438
|
+
isContextObject: (context: unknown) => context is ContextObject;
|
|
439
|
+
isContextProp: (context: unknown) => context is ContextProp;
|
|
440
|
+
isLabelledFramesSelector: (
|
|
441
|
+
selector: unknown
|
|
442
|
+
) => selector is LabelledFramesSelector;
|
|
443
|
+
isLabelledShadowDomSelector: (
|
|
444
|
+
selector: unknown
|
|
445
|
+
) => selector is LabelledShadowDomSelector;
|
|
446
|
+
|
|
447
|
+
DqElement: DqElementConstructor;
|
|
413
448
|
uuid: (
|
|
414
449
|
options?: { random?: Uint8Array | Array<number> },
|
|
415
450
|
buf?: Uint8Array | Array<number>,
|
|
416
451
|
offset?: number
|
|
417
452
|
) => string | Uint8Array | Array<number>;
|
|
453
|
+
nodeSerializer: NodeSerializer;
|
|
418
454
|
}
|
|
419
455
|
|
|
420
456
|
interface Aria {
|