axe-core 4.11.4 → 4.12.0-canary.81853d9
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 +42 -2
- package/axe.js +1218 -557
- package/axe.min.js +2 -2
- package/gather-internals.js +219 -0
- package/locales/_template.json +5 -0
- package/locales/ja.json +1 -0
- package/locales/{no_NB.json → nb.json} +1 -1
- package/locales/pt_BR.json +1 -1
- package/locales/pt_PT.json +1 -1
- package/locales/zh_CN.json +1 -1
- package/locales/zh_TW.json +1 -1
- package/package.json +23 -23
- package/sri-history.json +4 -0
package/axe.d.ts
CHANGED
|
@@ -147,6 +147,9 @@ declare namespace axe {
|
|
|
147
147
|
performanceTimer?: boolean;
|
|
148
148
|
pingWaitTime?: number;
|
|
149
149
|
}
|
|
150
|
+
interface NormalizedRunOptions extends RunOptions {
|
|
151
|
+
runOnly?: RunOnly;
|
|
152
|
+
}
|
|
150
153
|
interface PreloadOptions {
|
|
151
154
|
assets: string[];
|
|
152
155
|
timeout?: number;
|
|
@@ -331,7 +334,7 @@ declare namespace axe {
|
|
|
331
334
|
matches?: string | ((node: Element, virtualNode: VirtualNode) => boolean);
|
|
332
335
|
reviewOnFail?: boolean;
|
|
333
336
|
actIds?: string[];
|
|
334
|
-
metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds'>;
|
|
337
|
+
metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds' | 'enabled'>;
|
|
335
338
|
}
|
|
336
339
|
interface AxePlugin {
|
|
337
340
|
id: string;
|
|
@@ -349,6 +352,7 @@ declare namespace axe {
|
|
|
349
352
|
helpUrl: string;
|
|
350
353
|
tags: string[];
|
|
351
354
|
actIds?: string[];
|
|
355
|
+
enabled?: boolean;
|
|
352
356
|
}
|
|
353
357
|
interface SerialDqElement {
|
|
354
358
|
source: string;
|
|
@@ -501,6 +505,7 @@ declare namespace axe {
|
|
|
501
505
|
offset?: number
|
|
502
506
|
) => string | Uint8Array | Array<number>;
|
|
503
507
|
nodeSerializer: NodeSerializer;
|
|
508
|
+
normalizeRunOptions: (options?: RunOptions) => NormalizedRunOptions;
|
|
504
509
|
}
|
|
505
510
|
|
|
506
511
|
interface Aria {
|
|
@@ -618,13 +623,23 @@ declare namespace axe {
|
|
|
618
623
|
* @param {Array} tags Optional array of tags
|
|
619
624
|
* @return {Array} Array of rules
|
|
620
625
|
*/
|
|
621
|
-
function getRules(
|
|
626
|
+
function getRules(
|
|
627
|
+
tags?: string[]
|
|
628
|
+
): (Omit<RuleMetadata, 'enabled'> & { enabled: boolean })[];
|
|
622
629
|
|
|
623
630
|
/**
|
|
624
631
|
* Restores the default axe configuration
|
|
625
632
|
*/
|
|
626
633
|
function reset(): void;
|
|
627
634
|
|
|
635
|
+
/**
|
|
636
|
+
* Restores the default locale that was active before any
|
|
637
|
+
* `axe.configure({ locale })` call. No-op if no non-default
|
|
638
|
+
* locale has ever been applied. Does not affect any other
|
|
639
|
+
* configuration.
|
|
640
|
+
*/
|
|
641
|
+
function resetLocale(): void;
|
|
642
|
+
|
|
628
643
|
/**
|
|
629
644
|
* Function to register a plugin configuration in document and its subframes
|
|
630
645
|
* @param {Object} plugin A plugin configuration object
|
|
@@ -670,6 +685,31 @@ declare namespace axe {
|
|
|
670
685
|
isDefault?: boolean
|
|
671
686
|
): void;
|
|
672
687
|
|
|
688
|
+
/**
|
|
689
|
+
* Run axe in the current window only
|
|
690
|
+
* @param {ElementContext} context Optional The `Context` specification object @see Context
|
|
691
|
+
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
|
|
692
|
+
* @returns {Promise<PartialResult>} Partial result, for use in axe.finishRun.
|
|
693
|
+
*/
|
|
694
|
+
function externalAPIs(params?: {
|
|
695
|
+
elementInternalsTimeout?: number;
|
|
696
|
+
getElementInternals?: () => Promise<ElementInternalsMap>;
|
|
697
|
+
}): void;
|
|
698
|
+
|
|
699
|
+
type ElementInternalsMap = Array<{
|
|
700
|
+
ancestry: CrossTreeSelector;
|
|
701
|
+
internals: Record<string, InternalsData>;
|
|
702
|
+
}>;
|
|
703
|
+
type InternalsData = string | InternalsDataIdref | InternalsDataIdrefs;
|
|
704
|
+
type InternalsDataIdref = {
|
|
705
|
+
type: 'HTMLElement';
|
|
706
|
+
value: CrossTreeSelector;
|
|
707
|
+
};
|
|
708
|
+
type InternalsDataIdrefs = {
|
|
709
|
+
type: 'NodeList';
|
|
710
|
+
value: CrossTreeSelector[];
|
|
711
|
+
};
|
|
712
|
+
|
|
673
713
|
// axe.frameMessenger
|
|
674
714
|
type FrameMessenger = {
|
|
675
715
|
open: (topicHandler: TopicHandler) => Close | void;
|