//#region src/shared/protocol.d.ts /** axe-core impact buckets, ordered most → least severe. */ declare const IMPACT_ORDER: readonly ["critical", "serious", "moderate", "minor"]; type Impact = (typeof IMPACT_ORDER)[number]; interface ViolationNode { /** Stable id the page script assigned (mirrored to {@link A11Y_NODE_ATTR}). */ id: string; /** axe target selector(s) that resolve to the element. */ target: string[]; /** Trimmed `outerHTML` of the element, for display. */ html: string; /** axe's per-node failure summary. */ failureSummary: string; } interface Violation { /** axe rule id, e.g. `"image-alt"`. */ ruleId: string; impact: Impact; /** One-line, human-facing summary of the rule. */ help: string; /** Longer description of what the rule checks. */ description: string; /** Deque University rule documentation. */ helpUrl: string; /** WCAG tags the rule maps to, e.g. `["wcag2a", "wcag111"]`. */ tags?: string[]; /** Whether this is an axe best-practice rule rather than a WCAG success criterion. */ bestPractice?: boolean; nodes: ViolationNode[]; } interface ScanReport { /** Route bucket key: `location.pathname` of the scanned document. */ route: string; /** Full location of the scanned document. */ url: string; /** Epoch ms the scan finished. */ scannedAt: number; /** axe engine version that produced the report. */ engine: string; violations: Violation[]; /** Total violating nodes per impact bucket. */ counts: Record; } /** * Runtime configuration the panel resolves from the `get-config` RPC and * forwards to the page script over the channel (the page script keeps no RPC dependency). */ interface PageScriptConfig { /** Log newly-appeared violations to the browser console. */ logIssues: boolean; /** Rescan on debounced user interaction, on top of the DOM MutationObserver. */ autoScan: boolean; /** axe rule tags to run (defaults to {@link DEFAULT_AXE_TAGS}). */ axeTags?: string[]; /** Extra axe `run` options merged over the defaults. */ axeRunOptions?: Record; /** * Dock id the messages-feed navigation actions target (the devframe id). * Defaults to {@link A11Y_DEFAULT_DOCK_ID}. */ activateDockId?: string; } //#endregion export { ViolationNode as a, Violation as i, PageScriptConfig as n, ScanReport as r, Impact as t };