axe-core 4.11.4-canary.e823ff1 → 4.12.0

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
@@ -334,7 +334,7 @@ declare namespace axe {
334
334
  matches?: string | ((node: Element, virtualNode: VirtualNode) => boolean);
335
335
  reviewOnFail?: boolean;
336
336
  actIds?: string[];
337
- metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds'>;
337
+ metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds' | 'enabled'>;
338
338
  }
339
339
  interface AxePlugin {
340
340
  id: string;
@@ -352,6 +352,7 @@ declare namespace axe {
352
352
  helpUrl: string;
353
353
  tags: string[];
354
354
  actIds?: string[];
355
+ enabled: boolean;
355
356
  }
356
357
  interface SerialDqElement {
357
358
  source: string;
@@ -629,6 +630,14 @@ declare namespace axe {
629
630
  */
630
631
  function reset(): void;
631
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
+
632
641
  /**
633
642
  * Function to register a plugin configuration in document and its subframes
634
643
  * @param {Object} plugin A plugin configuration object
@@ -674,6 +683,31 @@ declare namespace axe {
674
683
  isDefault?: boolean
675
684
  ): void;
676
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
+
677
711
  // axe.frameMessenger
678
712
  type FrameMessenger = {
679
713
  open: (topicHandler: TopicHandler) => Close | void;