axe-sarif-converter
Version:
Convert axe-core accessibility scan results to the SARIF format
38 lines (37 loc) • 949 B
TypeScript
import { ImpactValue } from 'axe-core';
export interface AxeRawResult {
id: string;
result: string;
pageLevel: boolean;
impact?: ImpactValue;
tags: string[];
help: string;
helpUrl: string;
description: string;
inapplicable: AxeRawNodeResult[];
violations?: AxeRawNodeResult[];
passes?: AxeRawNodeResult[];
incomplete?: AxeRawNodeResult[];
}
export interface AxeRawNodeResult {
any: AxeRawCheckResult[];
all: AxeRawCheckResult[];
none: AxeRawCheckResult[];
node: AxeRawNode;
impact?: ImpactValue;
result?: ResultValue;
}
export interface AxeRawCheckResult {
id: string;
data?: any;
relatedNodes: AxeRawNode[];
impact: ImpactValue;
message?: string;
}
export interface AxeRawNode {
selector: Selector;
source: string;
xpath: string[];
}
export type ResultValue = 'passed' | 'failed' | 'inapplicable' | 'cantTell';
export type Selector = string[];