axe-core 4.11.4 → 4.12.0-canary.88ee9a3

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 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 {
@@ -625,6 +630,14 @@ declare namespace axe {
625
630
  */
626
631
  function reset(): void;
627
632
 
633
+ /**
634
+ * Restores the default locale that was active before any
635
+ * `axe.configure({ locale })` call. No-op if no non-default
636
+ * locale has ever been applied. Does not affect any other
637
+ * configuration.
638
+ */
639
+ function resetLocale(): void;
640
+
628
641
  /**
629
642
  * Function to register a plugin configuration in document and its subframes
630
643
  * @param {Object} plugin A plugin configuration object
@@ -670,6 +683,31 @@ declare namespace axe {
670
683
  isDefault?: boolean
671
684
  ): void;
672
685
 
686
+ /**
687
+ * Run axe in the current window only
688
+ * @param {ElementContext} context Optional The `Context` specification object @see Context
689
+ * @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
690
+ * @returns {Promise<PartialResult>} Partial result, for use in axe.finishRun.
691
+ */
692
+ function externalAPIs(params?: {
693
+ elementInternalsTimeout?: number;
694
+ getElementInternals?: () => Promise<ElementInternalsMap>;
695
+ }): void;
696
+
697
+ type ElementInternalsMap = Array<{
698
+ ancestry: CrossTreeSelector;
699
+ internals: Record<string, InternalsData>;
700
+ }>;
701
+ type InternalsData = string | InternalsDataIdref | InternalsDataIdrefs;
702
+ type InternalsDataIdref = {
703
+ type: 'HTMLElement';
704
+ value: CrossTreeSelector;
705
+ };
706
+ type InternalsDataIdrefs = {
707
+ type: 'NodeList';
708
+ value: CrossTreeSelector[];
709
+ };
710
+
673
711
  // axe.frameMessenger
674
712
  type FrameMessenger = {
675
713
  open: (topicHandler: TopicHandler) => Close | void;