@webability/core 1.3.1 → 1.5.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/README.md +54 -2
- package/dist/dom.cjs +25 -25
- package/dist/dom.d.cts +1 -1
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +25 -25
- package/dist/index.cjs +41 -41
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +41 -41
- package/dist/playwright.cjs +396 -0
- package/dist/playwright.d.cts +20 -0
- package/dist/playwright.d.ts +20 -0
- package/dist/playwright.js +396 -0
- package/dist/{types-10iqML3X.d.cts → types-C6Lhzod6.d.cts} +10 -1
- package/dist/{types-10iqML3X.d.ts → types-C6Lhzod6.d.ts} +10 -1
- package/package.json +18 -13
|
@@ -25,7 +25,7 @@ interface PageLike {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
/** All fix issue types the pipeline can detect and fix. */
|
|
28
|
-
type FixIssueType = 'weak_button_name' | 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'weak_skip_link' | 'missing_button_role' | 'missing_semantic_role' | 'missing_landmark' | 'heading_skip' | 'svg_missing_name' | 'aria_hidden_focusable' | 'adjacent_redundant_link' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'target_too_small' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'decorative_icon' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'duplicate_id' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'broken_anchor' | 'placeholder_link' | '
|
|
28
|
+
type FixIssueType = 'weak_button_name' | 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'weak_skip_link' | 'missing_button_role' | 'missing_semantic_role' | 'missing_landmark' | 'heading_skip' | 'svg_missing_name' | 'aria_hidden_focusable' | 'adjacent_redundant_link' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'target_too_small' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'decorative_icon' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'duplicate_id' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'broken_anchor' | 'placeholder_link' | 'missing_pattern_title' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'invalid_aria_role' | 'zoom_restriction' | 'missing_button_type' | 'link_consistency' | 'semantic_emphasis' | 'keyboard_trap' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'nested_landmark' | 'combobox_name_missing' | 'landmark_duplicate_unlabeled' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'missing_h1' | 'multiple_h1' | 'empty_heading' | 'javascript_link' | 'broken_aria_reference' | 'main_content_hidden' | 'scrollable_not_focusable' | 'meaningful_sequence' | 'sensory_characteristic' | 'orientation_lock' | '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' | 'insufficient_navigation' | 'inconsistent_navigation';
|
|
29
29
|
/** WCAG criterion for each issue type. */
|
|
30
30
|
declare const WCAG_BY_ISSUE: Record<FixIssueType, string>;
|
|
31
31
|
/** A single accessibility issue detected on the page. */
|
|
@@ -59,6 +59,15 @@ interface DetectedIssue {
|
|
|
59
59
|
needsReview?: boolean;
|
|
60
60
|
/** Why this finding needs review — surfaced to MCP/SDK consumers. */
|
|
61
61
|
reviewReason?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Optional exact user-facing message. Use when the generic
|
|
64
|
+
* attribute/currentValue template ("missing X", "X is \"Y\"") would state
|
|
65
|
+
* something false or fabricated — e.g. a weak button name whose name comes
|
|
66
|
+
* from text content has no missing aria-label to report (persona round 3,
|
|
67
|
+
* P069: 'weak button name: missing aria-label' on a named control).
|
|
68
|
+
* formatMessage prefers this verbatim when present.
|
|
69
|
+
*/
|
|
70
|
+
message?: string;
|
|
62
71
|
}
|
|
63
72
|
/** Every fix detector must implement this interface. */
|
|
64
73
|
interface FixDetector {
|
|
@@ -25,7 +25,7 @@ interface PageLike {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
/** All fix issue types the pipeline can detect and fix. */
|
|
28
|
-
type FixIssueType = 'weak_button_name' | 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'weak_skip_link' | 'missing_button_role' | 'missing_semantic_role' | 'missing_landmark' | 'heading_skip' | 'svg_missing_name' | 'aria_hidden_focusable' | 'adjacent_redundant_link' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'target_too_small' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'decorative_icon' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'duplicate_id' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'broken_anchor' | 'placeholder_link' | '
|
|
28
|
+
type FixIssueType = 'weak_button_name' | 'weak_link_name' | 'weak_heading' | 'weak_iframe_title' | 'weak_page_title' | 'weak_svg_name' | 'weak_skip_link' | 'missing_button_role' | 'missing_semantic_role' | 'missing_landmark' | 'heading_skip' | 'svg_missing_name' | 'aria_hidden_focusable' | 'adjacent_redundant_link' | 'contrast_insufficient' | 'non_text_contrast_insufficient' | 'target_too_small' | 'focus_not_visible' | 'empty_link' | 'unlabeled_button' | 'missing_label' | 'decorative_icon' | 'skip_link' | 'aria_live' | 'missing_alt' | 'identify_input_purpose' | 'redundant_role' | 'duplicate_id' | 'new_window_link' | 'missing_fieldset_legend' | 'missing_table_header' | 'missing_table_caption' | 'missing_table_scope' | 'external_link_warning' | 'download_link_warning' | 'broken_anchor' | 'placeholder_link' | 'missing_pattern_title' | 'missing_autocomplete' | 'missing_media_controls' | 'unsafe_autoplay' | 'invalid_aria_role' | 'zoom_restriction' | 'missing_button_type' | 'link_consistency' | 'semantic_emphasis' | 'keyboard_trap' | 'focus_order_disruption' | 'missing_captions' | 'color_only_link' | 'label_in_name' | 'onfocus_context_change' | 'focus_obscured_by_sticky' | 'text_spacing_blocked' | 'nested_landmark' | 'combobox_name_missing' | 'landmark_duplicate_unlabeled' | 'motion_uncontrollable' | 'auto_refresh' | 'motion_without_reduced_motion' | 'flashing_content' | 'animated_gif_no_pause' | 'missing_required_indicator' | 'background_image_unlabeled' | 'missing_h1' | 'multiple_h1' | 'empty_heading' | 'javascript_link' | 'broken_aria_reference' | 'main_content_hidden' | 'scrollable_not_focusable' | 'meaningful_sequence' | 'sensory_characteristic' | 'orientation_lock' | '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' | 'insufficient_navigation' | 'inconsistent_navigation';
|
|
29
29
|
/** WCAG criterion for each issue type. */
|
|
30
30
|
declare const WCAG_BY_ISSUE: Record<FixIssueType, string>;
|
|
31
31
|
/** A single accessibility issue detected on the page. */
|
|
@@ -59,6 +59,15 @@ interface DetectedIssue {
|
|
|
59
59
|
needsReview?: boolean;
|
|
60
60
|
/** Why this finding needs review — surfaced to MCP/SDK consumers. */
|
|
61
61
|
reviewReason?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Optional exact user-facing message. Use when the generic
|
|
64
|
+
* attribute/currentValue template ("missing X", "X is \"Y\"") would state
|
|
65
|
+
* something false or fabricated — e.g. a weak button name whose name comes
|
|
66
|
+
* from text content has no missing aria-label to report (persona round 3,
|
|
67
|
+
* P069: 'weak button name: missing aria-label' on a named control).
|
|
68
|
+
* formatMessage prefers this verbatim when present.
|
|
69
|
+
*/
|
|
70
|
+
message?: string;
|
|
62
71
|
}
|
|
63
72
|
/** Every fix detector must implement this interface. */
|
|
64
73
|
interface FixDetector {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webability/core",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Accessibility scanner engine
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "Accessibility scanner engine — WCAG 2.2 AA/AAA compliance testing with 200+ rules",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -16,21 +16,17 @@
|
|
|
16
16
|
"import": "./dist/dom.js",
|
|
17
17
|
"require": "./dist/dom.cjs",
|
|
18
18
|
"types": "./dist/dom.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./playwright": {
|
|
21
|
+
"import": "./dist/playwright.js",
|
|
22
|
+
"require": "./dist/playwright.cjs",
|
|
23
|
+
"types": "./dist/playwright.d.ts"
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
"files": [
|
|
22
27
|
"dist",
|
|
23
28
|
"NOTICES.md"
|
|
24
29
|
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "npm run gen:dom-kernel && tsup",
|
|
27
|
-
"dev": "tsup --watch",
|
|
28
|
-
"test": "vitest run",
|
|
29
|
-
"test:watch": "vitest",
|
|
30
|
-
"typecheck": "tsc --noEmit",
|
|
31
|
-
"clean": "rm -rf dist",
|
|
32
|
-
"gen:dom-kernel": "node scripts/gen-dom-kernel.mjs"
|
|
33
|
-
},
|
|
34
30
|
"keywords": [
|
|
35
31
|
"a11y",
|
|
36
32
|
"abilyo",
|
|
@@ -71,5 +67,14 @@
|
|
|
71
67
|
"engines": {
|
|
72
68
|
"node": ">=18"
|
|
73
69
|
},
|
|
74
|
-
"homepage": "https://
|
|
75
|
-
|
|
70
|
+
"homepage": "https://webability.io",
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "npm run gen:dom-kernel && tsup",
|
|
73
|
+
"dev": "tsup --watch",
|
|
74
|
+
"test": "vitest run",
|
|
75
|
+
"test:watch": "vitest",
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"clean": "rm -rf dist",
|
|
78
|
+
"gen:dom-kernel": "node scripts/gen-dom-kernel.mjs"
|
|
79
|
+
}
|
|
80
|
+
}
|