@webability/core 1.11.0 → 1.13.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/dist/dom.cjs +44 -39
- package/dist/dom.d.cts +3 -1
- package/dist/dom.d.ts +3 -1
- package/dist/dom.js +44 -39
- package/dist/engine.cjs +47 -41
- package/dist/engine.d.cts +284 -26
- package/dist/engine.d.ts +284 -26
- package/dist/engine.js +47 -41
- package/dist/index.cjs +55 -50
- package/dist/index.d.cts +16 -9
- package/dist/index.d.ts +16 -9
- package/dist/index.js +55 -50
- package/dist/playwright.cjs +44 -39
- package/dist/playwright.d.cts +1 -1
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +44 -39
- package/dist/{types-jXnoW_NT.d.cts → types-gjAJ8j0I.d.cts} +26 -1
- package/dist/{types-jXnoW_NT.d.ts → types-gjAJ8j0I.d.ts} +26 -1
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PageLike, S as ScanOptions, a as ScanResult, W as WcagLevel, b as SiteTheme, F as FixDetector, I as InternalBug, D as DetectedIssue, c as ScanIssue } from './types-
|
|
2
|
-
export { B as BrowserDetector, d as DEFAULT_JUDGE_BASE_URL, e as DEFAULT_JUDGE_TEXT_MODEL, f as DEFAULT_JUDGE_VISION_MODEL, g as FixIssueType, h as IssueImpact, i as IssueSource, J as JUDGE_DEFAULT_TIMEOUT_MS, j as JUDGE_SYSTEM_PROMPT, k as JudgeChatBody, l as JudgeItem, m as JudgeOptions, n as JudgeRequest, o as JudgeTransport, p as JudgeVerdict, q as JudgedEntry, V as VIEWPORT_SIZES, r as ViewportPreset, s as WCAG_BY_ISSUE, t as buildJudgeChatBody, u as hostedJudgeTransport, v as judgeUndecided, w as openAiCompatibleTransport, x as resetJudgeCache } from './types-
|
|
1
|
+
import { P as PageLike, S as ScanOptions, a as ScanResult, W as WcagLevel, b as SiteTheme, F as FixDetector, I as InternalBug, D as DetectedIssue, c as ScanIssue } from './types-gjAJ8j0I.cjs';
|
|
2
|
+
export { B as BrowserDetector, d as DEFAULT_JUDGE_BASE_URL, e as DEFAULT_JUDGE_TEXT_MODEL, f as DEFAULT_JUDGE_VISION_MODEL, g as FixIssueType, h as IssueImpact, i as IssueSource, J as JUDGE_DEFAULT_TIMEOUT_MS, j as JUDGE_SYSTEM_PROMPT, k as JudgeChatBody, l as JudgeItem, m as JudgeOptions, n as JudgeRequest, o as JudgeTransport, p as JudgeVerdict, q as JudgedEntry, V as VIEWPORT_SIZES, r as ViewportPreset, s as WCAG_BY_ISSUE, t as buildJudgeChatBody, u as hostedJudgeTransport, v as judgeUndecided, w as openAiCompatibleTransport, x as resetJudgeCache } from './types-gjAJ8j0I.cjs';
|
|
3
3
|
|
|
4
4
|
declare function scan(target: string | PageLike, options?: ScanOptions): Promise<ScanResult>;
|
|
5
5
|
|
|
@@ -10,26 +10,29 @@ declare function scan(target: string | PageLike, options?: ScanOptions): Promise
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Conformance level of every WCAG 2.2 success criterion
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Conformance level of every WCAG 2.2 success criterion. The ONE level table
|
|
14
|
+
* in core, and it is strict: a criterion missing from it (4.1.1 Parsing,
|
|
15
|
+
* removed in WCAG 2.2, or a typo) has no level, and a finding that names only
|
|
16
|
+
* such criteria is dropped from every report instead of being read as AA.
|
|
17
|
+
* The set is pinned by a test.
|
|
17
18
|
*/
|
|
18
19
|
declare const WCAG_LEVEL_MAP: Record<string, WcagLevel>;
|
|
19
|
-
declare function getWcagLevel(criterion: string): WcagLevel;
|
|
20
|
+
declare function getWcagLevel(criterion: string): WcagLevel | undefined;
|
|
20
21
|
/**
|
|
21
22
|
* The conformance level an issue belongs to: the LOWEST level among the
|
|
22
23
|
* criteria it names ("2.4.4,2.4.9" is an A finding), or the engine's own
|
|
23
|
-
* level when it names none.
|
|
24
|
+
* level when it names none. Criteria outside WCAG 2.2 are skipped; an issue
|
|
25
|
+
* that names only such criteria has no level (undefined).
|
|
24
26
|
*/
|
|
25
27
|
declare function issueLevel(issue: {
|
|
26
28
|
wcag?: string;
|
|
27
29
|
level?: WcagLevel;
|
|
28
|
-
}): WcagLevel;
|
|
30
|
+
}): WcagLevel | undefined;
|
|
29
31
|
/**
|
|
30
32
|
* Keep findings at `level` and below. Default scans are AA: AAA criteria are
|
|
31
33
|
* not reported at all (owner decision 2026-10-04 — not in issues[],
|
|
32
34
|
* incomplete[] or the summary); a caller opts in with `level: 'AAA'`.
|
|
35
|
+
* Findings with no WCAG 2.2 level are never kept.
|
|
33
36
|
*/
|
|
34
37
|
declare function withinLevel<T extends {
|
|
35
38
|
wcag?: string;
|
|
@@ -59,6 +62,8 @@ interface RunDetectorsOptions {
|
|
|
59
62
|
extraSerialDetectors?: FixDetector[];
|
|
60
63
|
/** Out: invariant-P entries (state a detector left behind, unmarked injections). */
|
|
61
64
|
internalBugs?: InternalBug[];
|
|
65
|
+
/** Also run EXPERIMENTAL_DETECTORS (best practice, not A/AA). Default false. */
|
|
66
|
+
experimental?: boolean;
|
|
62
67
|
}
|
|
63
68
|
declare function runDetectors(page: PageLike, outTruncated?: TruncationEntry[], outWarnings?: string[], options?: RunDetectorsOptions): Promise<DetectedIssue[]>;
|
|
64
69
|
declare function extractSiteTheme(page: PageLike): Promise<SiteTheme>;
|
|
@@ -80,6 +85,8 @@ interface CoverageSources {
|
|
|
80
85
|
detectorCriteria: () => readonly string[];
|
|
81
86
|
/** Every rule id verify_fix accepts as `wcag` besides a criterion: axe ids + detector issue types. */
|
|
82
87
|
ruleIds: () => readonly string[] | Promise<readonly string[]>;
|
|
88
|
+
/** The criteria a rule id can fail (axe tags, or WCAG_BY_ISSUE); [] when unknown. Optional for fakes. */
|
|
89
|
+
ruleCriteria?: (id: string) => readonly string[] | Promise<readonly string[]>;
|
|
83
90
|
}
|
|
84
91
|
/** Union of every engine's criteria. Throws if any registry cannot be read. */
|
|
85
92
|
declare function coveredCriteria(sources?: CoverageSources): Promise<Set<string>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PageLike, S as ScanOptions, a as ScanResult, W as WcagLevel, b as SiteTheme, F as FixDetector, I as InternalBug, D as DetectedIssue, c as ScanIssue } from './types-
|
|
2
|
-
export { B as BrowserDetector, d as DEFAULT_JUDGE_BASE_URL, e as DEFAULT_JUDGE_TEXT_MODEL, f as DEFAULT_JUDGE_VISION_MODEL, g as FixIssueType, h as IssueImpact, i as IssueSource, J as JUDGE_DEFAULT_TIMEOUT_MS, j as JUDGE_SYSTEM_PROMPT, k as JudgeChatBody, l as JudgeItem, m as JudgeOptions, n as JudgeRequest, o as JudgeTransport, p as JudgeVerdict, q as JudgedEntry, V as VIEWPORT_SIZES, r as ViewportPreset, s as WCAG_BY_ISSUE, t as buildJudgeChatBody, u as hostedJudgeTransport, v as judgeUndecided, w as openAiCompatibleTransport, x as resetJudgeCache } from './types-
|
|
1
|
+
import { P as PageLike, S as ScanOptions, a as ScanResult, W as WcagLevel, b as SiteTheme, F as FixDetector, I as InternalBug, D as DetectedIssue, c as ScanIssue } from './types-gjAJ8j0I.js';
|
|
2
|
+
export { B as BrowserDetector, d as DEFAULT_JUDGE_BASE_URL, e as DEFAULT_JUDGE_TEXT_MODEL, f as DEFAULT_JUDGE_VISION_MODEL, g as FixIssueType, h as IssueImpact, i as IssueSource, J as JUDGE_DEFAULT_TIMEOUT_MS, j as JUDGE_SYSTEM_PROMPT, k as JudgeChatBody, l as JudgeItem, m as JudgeOptions, n as JudgeRequest, o as JudgeTransport, p as JudgeVerdict, q as JudgedEntry, V as VIEWPORT_SIZES, r as ViewportPreset, s as WCAG_BY_ISSUE, t as buildJudgeChatBody, u as hostedJudgeTransport, v as judgeUndecided, w as openAiCompatibleTransport, x as resetJudgeCache } from './types-gjAJ8j0I.js';
|
|
3
3
|
|
|
4
4
|
declare function scan(target: string | PageLike, options?: ScanOptions): Promise<ScanResult>;
|
|
5
5
|
|
|
@@ -10,26 +10,29 @@ declare function scan(target: string | PageLike, options?: ScanOptions): Promise
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Conformance level of every WCAG 2.2 success criterion
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Conformance level of every WCAG 2.2 success criterion. The ONE level table
|
|
14
|
+
* in core, and it is strict: a criterion missing from it (4.1.1 Parsing,
|
|
15
|
+
* removed in WCAG 2.2, or a typo) has no level, and a finding that names only
|
|
16
|
+
* such criteria is dropped from every report instead of being read as AA.
|
|
17
|
+
* The set is pinned by a test.
|
|
17
18
|
*/
|
|
18
19
|
declare const WCAG_LEVEL_MAP: Record<string, WcagLevel>;
|
|
19
|
-
declare function getWcagLevel(criterion: string): WcagLevel;
|
|
20
|
+
declare function getWcagLevel(criterion: string): WcagLevel | undefined;
|
|
20
21
|
/**
|
|
21
22
|
* The conformance level an issue belongs to: the LOWEST level among the
|
|
22
23
|
* criteria it names ("2.4.4,2.4.9" is an A finding), or the engine's own
|
|
23
|
-
* level when it names none.
|
|
24
|
+
* level when it names none. Criteria outside WCAG 2.2 are skipped; an issue
|
|
25
|
+
* that names only such criteria has no level (undefined).
|
|
24
26
|
*/
|
|
25
27
|
declare function issueLevel(issue: {
|
|
26
28
|
wcag?: string;
|
|
27
29
|
level?: WcagLevel;
|
|
28
|
-
}): WcagLevel;
|
|
30
|
+
}): WcagLevel | undefined;
|
|
29
31
|
/**
|
|
30
32
|
* Keep findings at `level` and below. Default scans are AA: AAA criteria are
|
|
31
33
|
* not reported at all (owner decision 2026-10-04 — not in issues[],
|
|
32
34
|
* incomplete[] or the summary); a caller opts in with `level: 'AAA'`.
|
|
35
|
+
* Findings with no WCAG 2.2 level are never kept.
|
|
33
36
|
*/
|
|
34
37
|
declare function withinLevel<T extends {
|
|
35
38
|
wcag?: string;
|
|
@@ -59,6 +62,8 @@ interface RunDetectorsOptions {
|
|
|
59
62
|
extraSerialDetectors?: FixDetector[];
|
|
60
63
|
/** Out: invariant-P entries (state a detector left behind, unmarked injections). */
|
|
61
64
|
internalBugs?: InternalBug[];
|
|
65
|
+
/** Also run EXPERIMENTAL_DETECTORS (best practice, not A/AA). Default false. */
|
|
66
|
+
experimental?: boolean;
|
|
62
67
|
}
|
|
63
68
|
declare function runDetectors(page: PageLike, outTruncated?: TruncationEntry[], outWarnings?: string[], options?: RunDetectorsOptions): Promise<DetectedIssue[]>;
|
|
64
69
|
declare function extractSiteTheme(page: PageLike): Promise<SiteTheme>;
|
|
@@ -80,6 +85,8 @@ interface CoverageSources {
|
|
|
80
85
|
detectorCriteria: () => readonly string[];
|
|
81
86
|
/** Every rule id verify_fix accepts as `wcag` besides a criterion: axe ids + detector issue types. */
|
|
82
87
|
ruleIds: () => readonly string[] | Promise<readonly string[]>;
|
|
88
|
+
/** The criteria a rule id can fail (axe tags, or WCAG_BY_ISSUE); [] when unknown. Optional for fakes. */
|
|
89
|
+
ruleCriteria?: (id: string) => readonly string[] | Promise<readonly string[]>;
|
|
83
90
|
}
|
|
84
91
|
/** Union of every engine's criteria. Throws if any registry cannot be read. */
|
|
85
92
|
declare function coveredCriteria(sources?: CoverageSources): Promise<Set<string>>;
|