@webability/core 1.18.0 → 1.19.1
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 +597 -34
- package/dist/dom.d.cts +1 -1
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +597 -34
- package/dist/engine.cjs +602 -38
- package/dist/engine.d.cts +6 -5
- package/dist/engine.d.ts +6 -5
- package/dist/engine.js +602 -38
- package/dist/index.cjs +614 -50
- package/dist/index.d.cts +143 -4
- package/dist/index.d.ts +143 -4
- package/dist/index.js +614 -50
- package/dist/playwright.cjs +601 -37
- package/dist/playwright.d.cts +1 -1
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +601 -37
- package/dist/{types-Bk-B2Y9X.d.cts → types-B_q8lTmv.d.cts} +46 -4
- package/dist/{types-Bk-B2Y9X.d.ts → types-B_q8lTmv.d.ts} +46 -4
- package/package.json +4 -3
|
@@ -28,6 +28,14 @@ interface PixelVerdict {
|
|
|
28
28
|
bestRatio: number;
|
|
29
29
|
/** Worst (lowest) contrast ratio found anywhere behind the text. */
|
|
30
30
|
worstRatio: number;
|
|
31
|
+
/** Glyph-core measurement (text over an image or gradient): min, 2nd/5th/50th percentile, share of glyph pixels below the threshold. */
|
|
32
|
+
glyph?: {
|
|
33
|
+
min: number;
|
|
34
|
+
p02: number;
|
|
35
|
+
p05: number;
|
|
36
|
+
p50: number;
|
|
37
|
+
fractionBelow: number;
|
|
38
|
+
};
|
|
31
39
|
/** The background pixel behind the text that gave `worstRatio`, as rgb(r,g,b). */
|
|
32
40
|
worstBg?: string;
|
|
33
41
|
/** The background pixel behind the text that gave `bestRatio`, as rgb(r,g,b). */
|
|
@@ -62,13 +70,14 @@ interface PixelVerdict {
|
|
|
62
70
|
* verdict states a ratio the scanner measured, not one the model guessed.
|
|
63
71
|
*
|
|
64
72
|
* Models (local, via an OpenAI-compatible chat endpoint — OpenRouter by
|
|
65
|
-
* default): vision `
|
|
73
|
+
* default): vision `qwen/qwen3.6-35b-a3b` (open weights), text-only
|
|
66
74
|
* `deepseek/deepseek-v4-flash`. Hosted: POST `${apiUrl}/api/judge-incomplete`.
|
|
67
75
|
*/
|
|
68
76
|
|
|
69
77
|
declare const JUDGE_DEFAULT_TIMEOUT_MS = 20000;
|
|
70
78
|
declare const DEFAULT_JUDGE_BASE_URL = "https://openrouter.ai/api/v1";
|
|
71
|
-
|
|
79
|
+
/** Open-weights vision model first (standing rule); Anthropic only when WEBABILITY_JUDGE_VISION_MODEL names it. */
|
|
80
|
+
declare const DEFAULT_JUDGE_VISION_MODEL = "qwen/qwen3.6-35b-a3b";
|
|
72
81
|
declare const DEFAULT_JUDGE_TEXT_MODEL = "deepseek/deepseek-v4-flash";
|
|
73
82
|
type JudgeVerdictKind = 'pass' | 'violation';
|
|
74
83
|
/** One judged finding, as recorded on `ScanResult.judged`. Small on purpose. */
|
|
@@ -97,6 +106,23 @@ interface JudgeRequest {
|
|
|
97
106
|
level: WcagLevel;
|
|
98
107
|
vision: boolean;
|
|
99
108
|
items: JudgeItem[];
|
|
109
|
+
/**
|
|
110
|
+
* Rubric requests only (src/rubrics): the rubric's own system prompt and
|
|
111
|
+
* page-level evidence shared by every item. Undecided-finding batches leave
|
|
112
|
+
* both unset and get JUDGE_SYSTEM_PROMPT. The hosted endpoint ignores them.
|
|
113
|
+
*/
|
|
114
|
+
system?: string;
|
|
115
|
+
page?: Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* Rubric requests only: which rubric this is and a hash of its prompt. The
|
|
118
|
+
* hosted transport sends this INSTEAD of `system`: the platform resolves the
|
|
119
|
+
* prompt from its own @webability/core and refuses a hash it does not have,
|
|
120
|
+
* so a client never chooses the prompt the paid model runs.
|
|
121
|
+
*/
|
|
122
|
+
rubric?: {
|
|
123
|
+
id: string;
|
|
124
|
+
hash: string;
|
|
125
|
+
};
|
|
100
126
|
}
|
|
101
127
|
interface JudgeVerdict {
|
|
102
128
|
id: string;
|
|
@@ -139,6 +165,11 @@ interface JudgeOptions {
|
|
|
139
165
|
* the hosted path (the endpoint answers 413 above it, PNG only), none elsewhere.
|
|
140
166
|
*/
|
|
141
167
|
maxCropChars?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Opt-in rubric aspects (status: below-bar) to run as well as the default
|
|
170
|
+
* ones, by rubric id, e.g. ['heading-descriptive'].
|
|
171
|
+
*/
|
|
172
|
+
rubrics?: string[];
|
|
142
173
|
}
|
|
143
174
|
interface JudgeRunOptions extends JudgeOptions {
|
|
144
175
|
url: string;
|
|
@@ -172,6 +203,9 @@ interface JudgeChatBody {
|
|
|
172
203
|
* text model. `disableTextModelReasoning`: the default text model reasons unless
|
|
173
204
|
* told not to, and on a real 30-item batch spent all 4096 tokens reasoning (no
|
|
174
205
|
* verdicts, 48 s); set it only for endpoints that accept the `reasoning` field.
|
|
206
|
+
* A rubric request (`req.system`) asks whichever model it uses not to reason:
|
|
207
|
+
* one bounded call per aspect batch, and a reasoning flash model spends ~30x
|
|
208
|
+
* the tokens of its answer on a one-line verdict.
|
|
175
209
|
*/
|
|
176
210
|
declare function buildJudgeChatBody(req: JudgeRequest, cfg?: {
|
|
177
211
|
visionModel?: string;
|
|
@@ -226,7 +260,7 @@ interface PageLike {
|
|
|
226
260
|
axePage?(): unknown;
|
|
227
261
|
}
|
|
228
262
|
/** All fix issue types the pipeline can detect and fix. */
|
|
229
|
-
type FixIssueType = 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'missing_button_role' | 'missing_semantic_role' | 'missing_document_language' | 'svg_missing_name' | 'aria_hidden_focusable' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'form_missing_submit' | 'placeholder_link' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'zoom_restriction' | 'resize_text_clipped' | 'link_consistency' | 'keyboard_trap' | 'keyboard_trap_self_focus' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'carousel_autoplay_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'broken_aria_reference' | 'main_content_hidden' | 'meaningful_sequence' | 'sensory_characteristic' | 'image_of_text' | 'reflow_overflow' | 'missing_audio_description' | 'missing_transcript' | 'character_key_shortcut' | 'on_input_change' | 'pointer_gesture' | 'pointer_cancellation' | 'motion_actuation' | 'error_prevention_missing' | 'inconsistent_navigation' | 'adjacent_redundant_link' | 'missing_button_type' | 'decorative_image_with_title' | 'nested_landmark';
|
|
263
|
+
type FixIssueType = 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'missing_button_role' | 'missing_semantic_role' | 'missing_document_language' | 'svg_missing_name' | 'aria_hidden_focusable' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'form_missing_submit' | 'placeholder_link' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'zoom_restriction' | 'resize_text_clipped' | 'link_consistency' | 'keyboard_trap' | 'keyboard_trap_self_focus' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'carousel_autoplay_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'broken_aria_reference' | 'main_content_hidden' | 'meaningful_sequence' | 'sensory_characteristic' | 'image_of_text' | 'reflow_overflow' | 'missing_audio_description' | 'missing_transcript' | 'character_key_shortcut' | 'on_input_change' | 'pointer_gesture' | 'pointer_cancellation' | 'motion_actuation' | 'error_prevention_missing' | 'inconsistent_navigation' | 'image_name_not_descriptive' | 'hidden_image_not_decorative' | 'weak_form_label' | 'page_language_mismatch' | 'element_language_mismatch' | 'error_message_not_descriptive' | 'iframe_same_name_different_content' | 'identical_links_different_purpose' | 'auto_update_no_pause' | 'adjacent_redundant_link' | 'missing_button_type' | 'decorative_image_with_title' | 'nested_landmark';
|
|
230
264
|
/** WCAG criterion for each issue type. */
|
|
231
265
|
declare const WCAG_BY_ISSUE: Record<FixIssueType, string>;
|
|
232
266
|
/** A single accessibility issue detected on the page. */
|
|
@@ -265,6 +299,12 @@ interface DetectedIssue {
|
|
|
265
299
|
manualFix?: boolean;
|
|
266
300
|
/** Why this finding needs review — surfaced to MCP/SDK consumers. */
|
|
267
301
|
reviewReason?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Measurements the detector took for an uncertain verdict (effective
|
|
304
|
+
* opacity, font weights, a ratio, a frame origin). Handed to the judge as
|
|
305
|
+
* context with the row; never a verdict by itself.
|
|
306
|
+
*/
|
|
307
|
+
evidence?: Record<string, unknown>;
|
|
268
308
|
/**
|
|
269
309
|
* State pseudo-class the fix applies in (`:focus-visible` for
|
|
270
310
|
* focus_not_visible). `selector` always names the element at rest; a
|
|
@@ -340,6 +380,8 @@ interface ScanIssue {
|
|
|
340
380
|
confidence?: IssueConfidence;
|
|
341
381
|
/** Internal: why the engine could not decide; handed to the judge as context, never reported. */
|
|
342
382
|
reviewReason?: string;
|
|
383
|
+
/** Internal: the detector's measurements for the judge; never reported. */
|
|
384
|
+
evidence?: Record<string, unknown>;
|
|
343
385
|
fix?: {
|
|
344
386
|
attribute: string;
|
|
345
387
|
currentValue: string;
|
|
@@ -548,4 +590,4 @@ interface ScanOptions {
|
|
|
548
590
|
judge?: JudgeOptions;
|
|
549
591
|
}
|
|
550
592
|
|
|
551
|
-
export { type BrowserDetector as B, type DetectedIssue as D, type FixDetector as F, type
|
|
593
|
+
export { type BrowserDetector as B, type DetectedIssue as D, type FixDetector as F, type IssueImpact as I, type JudgeOptions as J, type PageLike as P, type ScanOptions as S, VIEWPORT_SIZES as V, type WcagLevel as W, type ScanResult as a, type ScanIssue as b, type InternalBug as c, type JudgeTransport as d, type SiteTheme as e, DEFAULT_JUDGE_BASE_URL as f, DEFAULT_JUDGE_TEXT_MODEL as g, DEFAULT_JUDGE_VISION_MODEL as h, type FixIssueType as i, type IssueSource as j, JUDGE_DEFAULT_TIMEOUT_MS as k, JUDGE_SYSTEM_PROMPT as l, type JudgeChatBody as m, type JudgeItem as n, type JudgeRequest as o, type JudgeVerdict as p, type JudgedEntry as q, type ViewportPreset as r, WCAG_BY_ISSUE as s, buildJudgeChatBody as t, hostedJudgeTransport as u, judgeUndecided as v, openAiCompatibleTransport as w, resetJudgeCache as x };
|
|
@@ -28,6 +28,14 @@ interface PixelVerdict {
|
|
|
28
28
|
bestRatio: number;
|
|
29
29
|
/** Worst (lowest) contrast ratio found anywhere behind the text. */
|
|
30
30
|
worstRatio: number;
|
|
31
|
+
/** Glyph-core measurement (text over an image or gradient): min, 2nd/5th/50th percentile, share of glyph pixels below the threshold. */
|
|
32
|
+
glyph?: {
|
|
33
|
+
min: number;
|
|
34
|
+
p02: number;
|
|
35
|
+
p05: number;
|
|
36
|
+
p50: number;
|
|
37
|
+
fractionBelow: number;
|
|
38
|
+
};
|
|
31
39
|
/** The background pixel behind the text that gave `worstRatio`, as rgb(r,g,b). */
|
|
32
40
|
worstBg?: string;
|
|
33
41
|
/** The background pixel behind the text that gave `bestRatio`, as rgb(r,g,b). */
|
|
@@ -62,13 +70,14 @@ interface PixelVerdict {
|
|
|
62
70
|
* verdict states a ratio the scanner measured, not one the model guessed.
|
|
63
71
|
*
|
|
64
72
|
* Models (local, via an OpenAI-compatible chat endpoint — OpenRouter by
|
|
65
|
-
* default): vision `
|
|
73
|
+
* default): vision `qwen/qwen3.6-35b-a3b` (open weights), text-only
|
|
66
74
|
* `deepseek/deepseek-v4-flash`. Hosted: POST `${apiUrl}/api/judge-incomplete`.
|
|
67
75
|
*/
|
|
68
76
|
|
|
69
77
|
declare const JUDGE_DEFAULT_TIMEOUT_MS = 20000;
|
|
70
78
|
declare const DEFAULT_JUDGE_BASE_URL = "https://openrouter.ai/api/v1";
|
|
71
|
-
|
|
79
|
+
/** Open-weights vision model first (standing rule); Anthropic only when WEBABILITY_JUDGE_VISION_MODEL names it. */
|
|
80
|
+
declare const DEFAULT_JUDGE_VISION_MODEL = "qwen/qwen3.6-35b-a3b";
|
|
72
81
|
declare const DEFAULT_JUDGE_TEXT_MODEL = "deepseek/deepseek-v4-flash";
|
|
73
82
|
type JudgeVerdictKind = 'pass' | 'violation';
|
|
74
83
|
/** One judged finding, as recorded on `ScanResult.judged`. Small on purpose. */
|
|
@@ -97,6 +106,23 @@ interface JudgeRequest {
|
|
|
97
106
|
level: WcagLevel;
|
|
98
107
|
vision: boolean;
|
|
99
108
|
items: JudgeItem[];
|
|
109
|
+
/**
|
|
110
|
+
* Rubric requests only (src/rubrics): the rubric's own system prompt and
|
|
111
|
+
* page-level evidence shared by every item. Undecided-finding batches leave
|
|
112
|
+
* both unset and get JUDGE_SYSTEM_PROMPT. The hosted endpoint ignores them.
|
|
113
|
+
*/
|
|
114
|
+
system?: string;
|
|
115
|
+
page?: Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* Rubric requests only: which rubric this is and a hash of its prompt. The
|
|
118
|
+
* hosted transport sends this INSTEAD of `system`: the platform resolves the
|
|
119
|
+
* prompt from its own @webability/core and refuses a hash it does not have,
|
|
120
|
+
* so a client never chooses the prompt the paid model runs.
|
|
121
|
+
*/
|
|
122
|
+
rubric?: {
|
|
123
|
+
id: string;
|
|
124
|
+
hash: string;
|
|
125
|
+
};
|
|
100
126
|
}
|
|
101
127
|
interface JudgeVerdict {
|
|
102
128
|
id: string;
|
|
@@ -139,6 +165,11 @@ interface JudgeOptions {
|
|
|
139
165
|
* the hosted path (the endpoint answers 413 above it, PNG only), none elsewhere.
|
|
140
166
|
*/
|
|
141
167
|
maxCropChars?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Opt-in rubric aspects (status: below-bar) to run as well as the default
|
|
170
|
+
* ones, by rubric id, e.g. ['heading-descriptive'].
|
|
171
|
+
*/
|
|
172
|
+
rubrics?: string[];
|
|
142
173
|
}
|
|
143
174
|
interface JudgeRunOptions extends JudgeOptions {
|
|
144
175
|
url: string;
|
|
@@ -172,6 +203,9 @@ interface JudgeChatBody {
|
|
|
172
203
|
* text model. `disableTextModelReasoning`: the default text model reasons unless
|
|
173
204
|
* told not to, and on a real 30-item batch spent all 4096 tokens reasoning (no
|
|
174
205
|
* verdicts, 48 s); set it only for endpoints that accept the `reasoning` field.
|
|
206
|
+
* A rubric request (`req.system`) asks whichever model it uses not to reason:
|
|
207
|
+
* one bounded call per aspect batch, and a reasoning flash model spends ~30x
|
|
208
|
+
* the tokens of its answer on a one-line verdict.
|
|
175
209
|
*/
|
|
176
210
|
declare function buildJudgeChatBody(req: JudgeRequest, cfg?: {
|
|
177
211
|
visionModel?: string;
|
|
@@ -226,7 +260,7 @@ interface PageLike {
|
|
|
226
260
|
axePage?(): unknown;
|
|
227
261
|
}
|
|
228
262
|
/** All fix issue types the pipeline can detect and fix. */
|
|
229
|
-
type FixIssueType = 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'missing_button_role' | 'missing_semantic_role' | 'missing_document_language' | 'svg_missing_name' | 'aria_hidden_focusable' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'form_missing_submit' | 'placeholder_link' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'zoom_restriction' | 'resize_text_clipped' | 'link_consistency' | 'keyboard_trap' | 'keyboard_trap_self_focus' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'carousel_autoplay_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'broken_aria_reference' | 'main_content_hidden' | 'meaningful_sequence' | 'sensory_characteristic' | 'image_of_text' | 'reflow_overflow' | 'missing_audio_description' | 'missing_transcript' | 'character_key_shortcut' | 'on_input_change' | 'pointer_gesture' | 'pointer_cancellation' | 'motion_actuation' | 'error_prevention_missing' | 'inconsistent_navigation' | 'adjacent_redundant_link' | 'missing_button_type' | 'decorative_image_with_title' | 'nested_landmark';
|
|
263
|
+
type FixIssueType = 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'missing_button_role' | 'missing_semantic_role' | 'missing_document_language' | 'svg_missing_name' | 'aria_hidden_focusable' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'form_missing_submit' | 'placeholder_link' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'zoom_restriction' | 'resize_text_clipped' | 'link_consistency' | 'keyboard_trap' | 'keyboard_trap_self_focus' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'carousel_autoplay_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'broken_aria_reference' | 'main_content_hidden' | 'meaningful_sequence' | 'sensory_characteristic' | 'image_of_text' | 'reflow_overflow' | 'missing_audio_description' | 'missing_transcript' | 'character_key_shortcut' | 'on_input_change' | 'pointer_gesture' | 'pointer_cancellation' | 'motion_actuation' | 'error_prevention_missing' | 'inconsistent_navigation' | 'image_name_not_descriptive' | 'hidden_image_not_decorative' | 'weak_form_label' | 'page_language_mismatch' | 'element_language_mismatch' | 'error_message_not_descriptive' | 'iframe_same_name_different_content' | 'identical_links_different_purpose' | 'auto_update_no_pause' | 'adjacent_redundant_link' | 'missing_button_type' | 'decorative_image_with_title' | 'nested_landmark';
|
|
230
264
|
/** WCAG criterion for each issue type. */
|
|
231
265
|
declare const WCAG_BY_ISSUE: Record<FixIssueType, string>;
|
|
232
266
|
/** A single accessibility issue detected on the page. */
|
|
@@ -265,6 +299,12 @@ interface DetectedIssue {
|
|
|
265
299
|
manualFix?: boolean;
|
|
266
300
|
/** Why this finding needs review — surfaced to MCP/SDK consumers. */
|
|
267
301
|
reviewReason?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Measurements the detector took for an uncertain verdict (effective
|
|
304
|
+
* opacity, font weights, a ratio, a frame origin). Handed to the judge as
|
|
305
|
+
* context with the row; never a verdict by itself.
|
|
306
|
+
*/
|
|
307
|
+
evidence?: Record<string, unknown>;
|
|
268
308
|
/**
|
|
269
309
|
* State pseudo-class the fix applies in (`:focus-visible` for
|
|
270
310
|
* focus_not_visible). `selector` always names the element at rest; a
|
|
@@ -340,6 +380,8 @@ interface ScanIssue {
|
|
|
340
380
|
confidence?: IssueConfidence;
|
|
341
381
|
/** Internal: why the engine could not decide; handed to the judge as context, never reported. */
|
|
342
382
|
reviewReason?: string;
|
|
383
|
+
/** Internal: the detector's measurements for the judge; never reported. */
|
|
384
|
+
evidence?: Record<string, unknown>;
|
|
343
385
|
fix?: {
|
|
344
386
|
attribute: string;
|
|
345
387
|
currentValue: string;
|
|
@@ -548,4 +590,4 @@ interface ScanOptions {
|
|
|
548
590
|
judge?: JudgeOptions;
|
|
549
591
|
}
|
|
550
592
|
|
|
551
|
-
export { type BrowserDetector as B, type DetectedIssue as D, type FixDetector as F, type
|
|
593
|
+
export { type BrowserDetector as B, type DetectedIssue as D, type FixDetector as F, type IssueImpact as I, type JudgeOptions as J, type PageLike as P, type ScanOptions as S, VIEWPORT_SIZES as V, type WcagLevel as W, type ScanResult as a, type ScanIssue as b, type InternalBug as c, type JudgeTransport as d, type SiteTheme as e, DEFAULT_JUDGE_BASE_URL as f, DEFAULT_JUDGE_TEXT_MODEL as g, DEFAULT_JUDGE_VISION_MODEL as h, type FixIssueType as i, type IssueSource as j, JUDGE_DEFAULT_TIMEOUT_MS as k, JUDGE_SYSTEM_PROMPT as l, type JudgeChatBody as m, type JudgeItem as n, type JudgeRequest as o, type JudgeVerdict as p, type JudgedEntry as q, type ViewportPreset as r, WCAG_BY_ISSUE as s, buildJudgeChatBody as t, hostedJudgeTransport as u, judgeUndecided as v, openAiCompatibleTransport as w, resetJudgeCache as x };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webability/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"description": "Accessibility scanner engine — WCAG 2.2 AA compliance testing with 200+ rules",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -40,13 +40,14 @@
|
|
|
40
40
|
"NOTICES.md"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "npm run gen:dom-kernel && tsup",
|
|
43
|
+
"build": "npm run gen:dom-kernel && npm run gen:rubrics && tsup",
|
|
44
44
|
"dev": "tsup --watch",
|
|
45
45
|
"test": "WA_STRICT_STATE=1 vitest run --testTimeout=20000",
|
|
46
46
|
"test:watch": "vitest",
|
|
47
47
|
"typecheck": "tsc --noEmit",
|
|
48
48
|
"clean": "rm -rf dist",
|
|
49
|
-
"gen:dom-kernel": "node scripts/gen-dom-kernel.mjs"
|
|
49
|
+
"gen:dom-kernel": "node scripts/gen-dom-kernel.mjs",
|
|
50
|
+
"gen:rubrics": "node scripts/gen-rubrics.mjs"
|
|
50
51
|
},
|
|
51
52
|
"keywords": [
|
|
52
53
|
"a11y",
|