accessibility-plugin-react 2.18.0 → 2.28.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 CHANGED
@@ -4,7 +4,7 @@ Composable React controls for display preferences and reading assistance. Choose
4
4
  the controls in JSX, keep the widget outside your application layout, and let
5
5
  the provider own state, persistence, effects, focus behavior, and cleanup.
6
6
 
7
- The `2.3.0` minor release introduces modular accessible control primitives (`FeatureCard`, `ToggleControl`, `ChoiceControl`, `StepperControl`), state UI (`SearchCount`, `EmptyState`, `ErrorState`), profile previews (`ProfilePreviewCard`), locale and oversized control modes (`largeControls`), and automated releases across npm, GitHub Releases, and GitHub Packages.
7
+ The library features modular accessible control primitives (`FeatureCard`, `ToggleControl`, `ChoiceControl`, `StepperControl`), state UI (`SearchCount`, `EmptyState`, `ErrorState`), profile previews (`ProfilePreviewCard`), locale packs (English, Sinhala, Tamil), offline dictionary lookup, native speech read-aloud TTS, opt-in saturation/grayscale with advisory warnings, reading mode, keyboard shortcuts, per-site feature-menu customization, development-only integration diagnostics (`runDiagnostics`, `<DiagnosticsHarness />`), optional privacy-safe feature event callbacks (`onFeatureEvent`), and automated releases across npm, GitHub Releases, and GitHub Packages.
8
8
  It supports React 18.3.1 and React 19.x, ships ESM, CommonJS, TypeScript declarations,
9
9
  and scoped plain CSS, and has no runtime dependency other than React and React DOM.
10
10
 
@@ -88,31 +88,35 @@ export function App() {
88
88
  Every controller is opt-in. Add only the controls that make sense for your
89
89
  site, and choose their order in JSX.
90
90
 
91
- | Controller | Effect |
92
- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
93
- | `TextScaleController` | Stepwise reflow-safe text enlargement (1.0x, 1.125x, 1.25x, 1.5x, 2.0x) protecting forms, code, and icons. |
94
- | `FontSizeController` | Scales eligible HTML text from 50% to 200%; supports continuous 10% steps or `stepScale` mode. |
95
- | `LineHeightController` | Scales computed line height (50%–200%, step 10); supports `stepPresets` (100%, 150%, 175%, 200%). |
96
- | `LetterSpacingController` | Applies 0–10px letter spacing with automatic cursive (Arabic/RTL) and Indic (Sinhala/Tamil) protection. |
97
- | `WordSpacingController` | Applies 0–10px word spacing while protecting tables, code, forms, and widget internals. |
98
- | `ContrastController` | Adjusts contrast levels, palettes, or semantic modes while preserving images, video, charts, and validation. |
99
- | `ContrastModeController` | Applies light, dark, high contrast, or media-safe invert tokens with native forced-colors protection. |
100
- | `SaturationController` | Reduces or increases saturation. |
101
- | `InvertColorsController` | Inverts eligible page content. |
102
- | `GrayscaleController` | Removes color while preserving the selected saturation value for later. |
103
- | `LinkHighlightController` | Highlights links or selects a link palette. |
104
- | `TextAlignController` | Scopes left, center, right, or justified alignment to text blocks; warns about justification. |
105
- | `FontFamilyController` | Applies clean system-ui or OpenDyslexic with Sinhala/Tamil fallbacks while protecting code and icons. |
106
- | `HideImagesController` / `HideDecorativeImagesController` | Hides only eligible decorative images while preserving controls, CAPTCHA, charts, maps, and informative graphics. |
107
- | `HideVideosController` | Hides video elements and recognized YouTube/Vimeo embeds visually. |
108
- | `BigCursorController` | Applies a 40px high-contrast SVG pointer; capability-aware (requires `(pointer: fine)`). |
109
- | `ReadingMaskController` | Adjustable transparent reading window (40–400px, default 100px); pointer-transparent; follows pointer, touch, and focus. |
110
- | `ReadingGuideController` | 4px pointer-transparent guide ruler; never blocks clicks/selection; follows pointer, touch, and focus. |
111
- | `TooltipsController` / `AccessibleTooltipsController` | Accessible tooltips for authored descriptions (`aria-description`, `aria-describedby`, `alt`, etc.) with WCAG 1.4.13. |
112
- | `PageNavigatorController` / `HeadingsNavigatorController` | Explores real headings and landmarks, supports keyboard navigation, safe scroll/focus, and search filtering. |
113
- | `ProfilesController` / `ProfileController` | Previews, applies, and reverts eight neutral presets (Motor, Blind, Color Blind, Dyslexia, etc.) with deterministic overrides. |
114
- | `PresetsController` / `CustomPresetsController` | Saves named custom presets and handles versioned JSON import/export with privacy exclusions. |
115
- | `ResetController` | Resets display features and custom registered features without moving the widget. |
91
+ | Controller | Effect |
92
+ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
93
+ | `TextScaleController` | Stepwise reflow-safe text enlargement (1.0x, 1.125x, 1.25x, 1.5x, 2.0x) protecting forms, code, and icons. |
94
+ | `FontSizeController` | Scales eligible HTML text from 50% to 200%; supports continuous 10% steps or `stepScale` mode. |
95
+ | `LineHeightController` | Scales computed line height (50%–200%, step 10); supports `stepPresets` (100%, 150%, 175%, 200%). |
96
+ | `LetterSpacingController` | Applies 0–10px letter spacing with automatic cursive (Arabic/RTL) and Indic (Sinhala/Tamil) protection. |
97
+ | `WordSpacingController` | Applies 0–10px word spacing while protecting tables, code, forms, and widget internals. |
98
+ | `ContrastController` | Adjusts contrast levels, palettes, or semantic modes while preserving images, video, charts, and validation. |
99
+ | `ContrastModeController` | Applies light, dark, high contrast, or media-safe invert tokens with native forced-colors protection. |
100
+ | `SmartContrastController` | Opt-in smart contrast research prototype; evaluates relative luminance against computed backdrop without layout thrashing; reports unsupported elements; non-destructive restoration. |
101
+ | `SaturationController` | Reduces or increases saturation. |
102
+ | `InvertColorsController` | Inverts eligible page content. |
103
+ | `GrayscaleController` | Removes color while preserving the selected saturation value for later. |
104
+ | `LinkHighlightController` | Highlights links or selects a link palette. |
105
+ | `TextAlignController` | Scopes left, center, right, or justified alignment to text blocks; warns about justification. |
106
+ | `FontFamilyController` | Applies clean system-ui or OpenDyslexic with Sinhala/Tamil fallbacks while protecting code and icons. |
107
+ | `HideImagesController` / `HideDecorativeImagesController` | Hides only eligible decorative images while preserving controls, CAPTCHA, charts, maps, and informative graphics. |
108
+ | `HideVideosController` | Hides video elements and recognized YouTube/Vimeo embeds visually. |
109
+ | `BigCursorController` | Applies a 40px high-contrast SVG pointer; capability-aware (requires `(pointer: fine)`). |
110
+ | `ReadingMaskController` | Adjustable transparent reading window (40–400px, default 100px); pointer-transparent; follows pointer, touch, and focus. |
111
+ | `ReadingGuideController` | 4px pointer-transparent guide ruler; never blocks clicks/selection; follows pointer, touch, and focus. |
112
+ | `TooltipsController` / `AccessibleTooltipsController` | Accessible tooltips for authored descriptions (`aria-description`, `aria-describedby`, `alt`, etc.) with WCAG 1.4.13. |
113
+ | `PageNavigatorController` / `HeadingsNavigatorController` | Explores real headings and landmarks, supports keyboard navigation, safe scroll/focus, and search filtering. |
114
+ | `ProfilesController` / `ProfileController` | Previews, applies, and reverts eight neutral presets (Motor, Blind, Color Blind, Dyslexia, etc.) with deterministic overrides. |
115
+ | `PresetsController` / `CustomPresetsController` | Saves named custom presets and handles versioned JSON import/export with privacy exclusions. |
116
+ | `ReadAloudController` | User-initiated native text-to-speech with play/pause/resume/stop, voice selection, rate/pitch steppers, and sensitive field protection. |
117
+ | `DictionaryController` | Accessible terminology dictionary dialog with 100% offline local glossaries (en, si, ta), sanitization, and focus restoration. |
118
+ | `VoiceNavigationController` | Opt-in voice navigation research prototype; navigates headings and scrolls via native Web Speech recognition with inactivity timeout, zero audio storage, and full keyboard fallback. |
119
+ | `ResetController` | Resets display features and custom registered features without moving the widget. |
116
120
 
117
121
  Effects compose where appropriate. For example, contrast, saturation, invert,
118
122
  and grayscale are applied in a deterministic order. Defaults leave host styles
@@ -129,6 +133,14 @@ Build custom accessible panels or custom features with modular primitives that i
129
133
  - **`StepperControl`**: Bounded decrement/increment buttons, `<output aria-live="polite">`, and optional range slider.
130
134
  - **`SearchCount` & `EmptyState`**: Polite live announcements for feature filtering and search zero-results states.
131
135
  - **`ProfilePreviewCard`**: Previews affected accessibility profile settings (e.g. low-vision, dyslexia, cognitive) and provides one-click reversal back to custom settings.
136
+ - **`ReadingModeController`**: Non-destructive article content reader with Light/Sepia/Dark themes, font scaling, and zero external transmission.
137
+ - **`KeyboardShortcutsController`**: Discoverable keyboard shortcut cheat sheet, collision-checked remapping, protected browser commands (e.g. Ctrl+U), form typing protection, and full Link Explorer.
138
+ - **`ReadAloudController`**: User-initiated native text-to-speech (TTS) with play, pause, resume, and stop controls, voice dropdown, rate and pitch steppers, persistent floating player bar, and sensitive field exclusion.
139
+ - **`DictionaryController`**: Accessible terminology dictionary lookup with local offline glossaries in English, Sinhala, and Tamil, sensitive data rejection, and truthful non-hallucinating responses.
140
+ - **`SmartContrastController`**: Measured relative luminance contrast enhancement research prototype with Porter-Duff compositing, LRU caching, and unsupported background reporting. See [docs/SMART_CONTRAST.md](docs/SMART_CONTRAST.md).
141
+ - **`VoiceNavigationController`**: Client-side speech navigation research prototype for headings and scrolling with inactivity watchdog, background tab protection, and keyboard alternatives. See [docs/VOICE_NAVIGATION.md](docs/VOICE_NAVIGATION.md).
142
+ - **`TranslationController`**: Host-content translation adapter architecture research prototype with explicit consent, privacy threat model, sensitive element exclusion, and DOM restoration. See [docs/TRANSLATION.md](docs/TRANSLATION.md).
143
+ - **`FeatureMenu`**: Declarative per-site feature menu reordering, grouping, custom labels, and non-crashing safe diagnostics with stable rerenders. See [docs/MENU_CUSTOMIZATION.md](docs/MENU_CUSTOMIZATION.md).
132
144
 
133
145
  ## Custom features
134
146
 
@@ -293,6 +305,10 @@ See [troubleshooting](docs/TROUBLESHOOTING.md) before filing an issue.
293
305
  - [Migration from v1 and development baselines](docs/MIGRATION.md)
294
306
  - [Architecture and lifecycle decisions](docs/ARCHITECTURE.md)
295
307
  - [Development and testing](docs/DEVELOPMENT.md)
308
+ - [Per-site feature-menu customization](docs/MENU_CUSTOMIZATION.md)
309
+ - [Development-only integration diagnostics and test harness](docs/DIAGNOSTICS.md)
310
+ - [Optional privacy-safe feature event callbacks](docs/PRIVACY_AND_EVENTS.md)
311
+ - [Smart contrast research prototype](docs/SMART_CONTRAST.md)
296
312
  - [Design foundation](docs/DESIGN.md)
297
313
  - [Troubleshooting](docs/TROUBLESHOOTING.md)
298
314
  - [Project status and verification evidence](docs/PROJECT_STATUS.md)