Update checked-in dependencies
This commit is contained in:
parent
3e913ef09d
commit
9660df3fcc
990 changed files with 74805 additions and 60149 deletions
206
node_modules/axe-core/axe.d.ts
generated
vendored
206
node_modules/axe-core/axe.d.ts
generated
vendored
|
|
@ -1,13 +1,12 @@
|
|||
// Type definitions for axe-core
|
||||
// Project: https://github.com/dequelabs/axe-core
|
||||
// Definitions by: Marcy Sutton <https://github.com/marcysutton>
|
||||
|
||||
declare namespace axe {
|
||||
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical' | null;
|
||||
|
||||
type TagValue = string;
|
||||
|
||||
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'raw-env' | 'no-passes';
|
||||
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'rawEnv' | 'no-passes';
|
||||
|
||||
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
|
||||
|
||||
|
|
@ -71,16 +70,19 @@ declare namespace axe {
|
|||
| LabelledShadowDomSelector
|
||||
| LabelledFramesSelector;
|
||||
type SelectorList = Array<Selector | FramesSelector> | NodeList;
|
||||
type ContextProp = Selector | SelectorList;
|
||||
type ContextObject =
|
||||
| {
|
||||
include: Selector | SelectorList;
|
||||
exclude?: Selector | SelectorList;
|
||||
include: ContextProp;
|
||||
exclude?: ContextProp;
|
||||
}
|
||||
| {
|
||||
exclude: Selector | SelectorList;
|
||||
include?: Selector | SelectorList;
|
||||
exclude: ContextProp;
|
||||
include?: ContextProp;
|
||||
};
|
||||
type ElementContext = Selector | SelectorList | ContextObject;
|
||||
type ContextSpec = ContextProp | ContextObject;
|
||||
/** Synonym to ContextSpec */
|
||||
type ElementContext = ContextSpec;
|
||||
|
||||
type SerialSelector =
|
||||
| BaseSelector
|
||||
|
|
@ -132,7 +134,7 @@ declare namespace axe {
|
|||
interface RunOptions {
|
||||
runOnly?: RunOnly | TagValue[] | string[] | string;
|
||||
rules?: RuleObject;
|
||||
reporter?: ReporterVersion;
|
||||
reporter?: ReporterVersion | string;
|
||||
resultTypes?: resultGroups[];
|
||||
selectors?: boolean;
|
||||
ancestry?: boolean;
|
||||
|
|
@ -141,10 +143,14 @@ declare namespace axe {
|
|||
iframes?: boolean;
|
||||
elementRef?: boolean;
|
||||
frameWaitTime?: number;
|
||||
preload?: boolean;
|
||||
preload?: boolean | PreloadOptions;
|
||||
performanceTimer?: boolean;
|
||||
pingWaitTime?: number;
|
||||
}
|
||||
interface PreloadOptions {
|
||||
assets: string[];
|
||||
timeout?: number;
|
||||
}
|
||||
interface AxeResults extends EnvironmentData {
|
||||
toolOptions: RunOptions;
|
||||
passes: Result[];
|
||||
|
|
@ -164,9 +170,9 @@ declare namespace axe {
|
|||
interface NodeResult {
|
||||
html: string;
|
||||
impact?: ImpactValue;
|
||||
target: string[];
|
||||
target: UnlabelledFrameSelector;
|
||||
xpath?: string[];
|
||||
ancestry?: string[];
|
||||
ancestry?: UnlabelledFrameSelector;
|
||||
any: CheckResult[];
|
||||
all: CheckResult[];
|
||||
none: CheckResult[];
|
||||
|
|
@ -181,8 +187,11 @@ declare namespace axe {
|
|||
relatedNodes?: RelatedNode[];
|
||||
}
|
||||
interface RelatedNode {
|
||||
target: string[];
|
||||
html: string;
|
||||
target: UnlabelledFrameSelector;
|
||||
xpath?: string[];
|
||||
ancestry?: UnlabelledFrameSelector;
|
||||
element?: HTMLElement;
|
||||
}
|
||||
interface RuleLocale {
|
||||
[key: string]: {
|
||||
|
|
@ -190,12 +199,13 @@ declare namespace axe {
|
|||
help: string;
|
||||
};
|
||||
}
|
||||
interface CheckMessages {
|
||||
pass: string | { [key: string]: string };
|
||||
fail: string | { [key: string]: string };
|
||||
incomplete?: string | { [key: string]: string };
|
||||
}
|
||||
interface CheckLocale {
|
||||
[key: string]: {
|
||||
pass: string | { [key: string]: string };
|
||||
fail: string | { [key: string]: string };
|
||||
incomplete: string | { [key: string]: string };
|
||||
};
|
||||
[key: string]: CheckMessages;
|
||||
}
|
||||
interface Locale {
|
||||
lang?: string;
|
||||
|
|
@ -237,7 +247,7 @@ declare namespace axe {
|
|||
}
|
||||
interface Spec {
|
||||
branding?: string | Branding;
|
||||
reporter?: ReporterVersion;
|
||||
reporter?: ReporterVersion | string | AxeReporter;
|
||||
checks?: Check[];
|
||||
rules?: Rule[];
|
||||
standards?: Standards;
|
||||
|
|
@ -256,13 +266,38 @@ declare namespace axe {
|
|||
brand?: string;
|
||||
application?: string;
|
||||
}
|
||||
interface CheckHelper {
|
||||
async: () => (result: boolean | undefined | Error) => void;
|
||||
data: (data: unknown) => void;
|
||||
relatedNodes: (nodes: Element[]) => void;
|
||||
}
|
||||
interface AfterResult {
|
||||
id: string;
|
||||
data?: unknown;
|
||||
relatedNodes: SerialDqElement[];
|
||||
result: boolean | undefined;
|
||||
node: SerialDqElement;
|
||||
}
|
||||
interface Check {
|
||||
id: string;
|
||||
evaluate?: Function | string;
|
||||
after?: Function | string;
|
||||
evaluate?:
|
||||
| string
|
||||
| ((
|
||||
this: CheckHelper,
|
||||
node: Element,
|
||||
options: unknown,
|
||||
virtualNode: VirtualNode
|
||||
) => boolean | undefined | void);
|
||||
after?:
|
||||
| string
|
||||
| ((results: AfterResult[], options: unknown) => AfterResult[]);
|
||||
options?: any;
|
||||
matches?: string;
|
||||
enabled?: boolean;
|
||||
metadata?: {
|
||||
impact?: ImpactValue;
|
||||
messages?: CheckMessages;
|
||||
};
|
||||
}
|
||||
interface Rule {
|
||||
id: string;
|
||||
|
|
@ -275,8 +310,10 @@ declare namespace axe {
|
|||
all?: string[];
|
||||
none?: string[];
|
||||
tags?: string[];
|
||||
matches?: string;
|
||||
matches?: string | ((node: Element, virtualNode: VirtualNode) => boolean);
|
||||
reviewOnFail?: boolean;
|
||||
actIds?: string[];
|
||||
metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds'>;
|
||||
}
|
||||
interface AxePlugin {
|
||||
id: string;
|
||||
|
|
@ -302,6 +339,14 @@ declare namespace axe {
|
|||
xpath: string[];
|
||||
ancestry: UnlabelledFrameSelector;
|
||||
}
|
||||
interface DqElement extends SerialDqElement {
|
||||
element: Element;
|
||||
toJSON(): SerialDqElement;
|
||||
mergeSpecs(
|
||||
childSpec: SerialDqElement,
|
||||
parentSpec: SerialDqElement
|
||||
): SerialDqElement;
|
||||
}
|
||||
interface PartialRuleResult {
|
||||
id: string;
|
||||
result: 'inapplicable';
|
||||
|
|
@ -319,6 +364,47 @@ declare namespace axe {
|
|||
frameSelector: CrossTreeSelector;
|
||||
frameContext: FrameContextObject;
|
||||
}
|
||||
|
||||
interface RawCheckResult extends Omit<CheckResult, 'relatedNodes'> {
|
||||
relatedNodes?: Array<SerialDqElement | DqElement>;
|
||||
}
|
||||
|
||||
interface RawNodeResult<T extends 'passed' | 'failed' | 'incomplete'> {
|
||||
node: SerialDqElement | DqElement;
|
||||
any: RawCheckResult[];
|
||||
all: RawCheckResult[];
|
||||
none: RawCheckResult[];
|
||||
impact: ImpactValue | null;
|
||||
result: T;
|
||||
}
|
||||
|
||||
interface RawResult extends Omit<Result, 'nodes'> {
|
||||
inapplicable: Array<never>;
|
||||
passes: RawNodeResult<'passed'>[];
|
||||
incomplete: RawNodeResult<'incomplete'>[];
|
||||
violations: RawNodeResult<'failed'>[];
|
||||
pageLevel: boolean;
|
||||
result: 'failed' | 'passed' | 'incomplete' | 'inapplicable';
|
||||
}
|
||||
|
||||
type AxeReporter<T = unknown> = (
|
||||
rawResults: RawResult[],
|
||||
option: RunOptions,
|
||||
resolve: (report: T) => void,
|
||||
reject: (error: Error) => void
|
||||
) => void;
|
||||
|
||||
interface VirtualNode {
|
||||
actualNode?: Node;
|
||||
shadowId?: string;
|
||||
children?: VirtualNode[];
|
||||
parent?: VirtualNode;
|
||||
attr(attr: string): string | null;
|
||||
hasAttr(attr: string): boolean;
|
||||
props: { [key: string]: unknown };
|
||||
boundingClientRect: DOMRect;
|
||||
}
|
||||
|
||||
interface Utils {
|
||||
getFrameContexts: (
|
||||
context?: ElementContext,
|
||||
|
|
@ -326,7 +412,55 @@ declare namespace axe {
|
|||
) => FrameContext[];
|
||||
shadowSelect: (selector: CrossTreeSelector) => Element | null;
|
||||
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
|
||||
getStandards(): Required<Standards>;
|
||||
isContextSpec: (context: unknown) => context is ContextSpec;
|
||||
isContextObject: (context: unknown) => context is ContextObject;
|
||||
isContextProp: (context: unknown) => context is ContextProp;
|
||||
isLabelledFramesSelector: (
|
||||
selector: unknown
|
||||
) => selector is LabelledFramesSelector;
|
||||
isLabelledShadowDomSelector: (
|
||||
selector: unknown
|
||||
) => selector is LabelledShadowDomSelector;
|
||||
|
||||
DqElement: new (
|
||||
elm: Element,
|
||||
options?: { absolutePaths?: boolean }
|
||||
) => DqElement;
|
||||
uuid: (
|
||||
options?: { random?: Uint8Array | Array<number> },
|
||||
buf?: Uint8Array | Array<number>,
|
||||
offset?: number
|
||||
) => string | Uint8Array | Array<number>;
|
||||
}
|
||||
|
||||
interface Aria {
|
||||
getRoleType: (role: string | Element | VirtualNode | null) => string | null;
|
||||
}
|
||||
|
||||
interface Dom {
|
||||
isFocusable: (node: Element | VirtualNode) => boolean;
|
||||
isNativelyFocusable: (node: Element | VirtualNode) => boolean;
|
||||
}
|
||||
|
||||
type AccessibleTextOptions = {
|
||||
inControlContext?: boolean;
|
||||
inLabelledByContext?: boolean;
|
||||
};
|
||||
|
||||
interface Text {
|
||||
accessibleText: (
|
||||
element: Element,
|
||||
options?: AccessibleTextOptions
|
||||
) => string;
|
||||
}
|
||||
|
||||
interface Commons {
|
||||
aria: Aria;
|
||||
dom: Dom;
|
||||
text: Text;
|
||||
}
|
||||
|
||||
interface EnvironmentData {
|
||||
testEngine: TestEngine;
|
||||
testRunner: TestRunner;
|
||||
|
|
@ -338,6 +472,7 @@ declare namespace axe {
|
|||
let version: string;
|
||||
let plugins: any;
|
||||
let utils: Utils;
|
||||
let commons: Commons;
|
||||
|
||||
/**
|
||||
* Source string to use as an injected script in Selenium
|
||||
|
|
@ -436,6 +571,35 @@ declare namespace axe {
|
|||
*/
|
||||
function frameMessenger(frameMessenger: FrameMessenger): void;
|
||||
|
||||
/**
|
||||
* Setup axe-core so axe.common functions can work properly.
|
||||
*/
|
||||
function setup(node?: Element | Document): VirtualNode;
|
||||
|
||||
/**
|
||||
* Clean up axe-core tree and caches. `axe.run` will call this function at the end of the run so there's no need to call it yourself afterwards.
|
||||
*/
|
||||
function teardown(): void;
|
||||
|
||||
/**
|
||||
* Check if a reporter is registered
|
||||
*/
|
||||
function hasReporter(reporterName: string): boolean;
|
||||
|
||||
/**
|
||||
* Get a reporter based the name it is registered with
|
||||
*/
|
||||
function getReporter<T>(reporterName: string): AxeReporter<T>;
|
||||
|
||||
/**
|
||||
* Register a new reporter, optionally setting it as the default
|
||||
*/
|
||||
function addReporter<T>(
|
||||
reporterName: string,
|
||||
reporter: AxeReporter<T>,
|
||||
isDefault?: boolean
|
||||
): void;
|
||||
|
||||
// axe.frameMessenger
|
||||
type FrameMessenger = {
|
||||
open: (topicHandler: TopicHandler) => Close | void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue