accessibility-plugin-react 2.12.0 → 2.16.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
@@ -88,27 +88,31 @@ 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
- | `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
+ | `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. |
112
116
 
113
117
  Effects compose where appropriate. For example, contrast, saturation, invert,
114
118
  and grayscale are applied in a deterministic order. Defaults leave host styles
package/dist/index.d.mts CHANGED
@@ -38,6 +38,11 @@ interface ProfileDefinition {
38
38
  description: string;
39
39
  settings: Partial<AccessibilityPreferences>;
40
40
  }
41
+ interface ActiveProfileState {
42
+ profileId: ProfilePresetId;
43
+ baseSnapshot: Partial<AccessibilityPreferences>;
44
+ overrides: Partial<AccessibilityPreferences>;
45
+ }
41
46
  interface PreferencesState {
42
47
  /** Base preferences configured before any profile was selected. */
43
48
  base: AccessibilityPreferences;
@@ -68,6 +73,7 @@ type PreferencesAction = {
68
73
  };
69
74
 
70
75
  declare const DEFAULT_PREFERENCES: Readonly<AccessibilityPreferences>;
76
+ declare const ALL_PROFILE_IDS: readonly ProfilePresetId[];
71
77
  declare const PROFILE_DEFINITIONS: Record<ProfilePresetId, ProfileDefinition>;
72
78
 
73
79
  declare function normalizePreferenceValue<K extends keyof AccessibilityPreferences>(key: K, value: unknown): AccessibilityPreferences[K];
@@ -352,6 +358,55 @@ declare function useAccessibility<T>(featureKey: string, defaultValue: T, option
352
358
 
353
359
  declare const AccessibilityContext: react.Context<AccessibilityContextValue | null>;
354
360
 
361
+ /**
362
+ * Retrieves a profile definition by its unique identifier.
363
+ */
364
+ declare function getProfileDefinition(id: ProfilePresetId): ProfileDefinition | undefined;
365
+ /**
366
+ * Maps typed AccessibilityPreferences settings to internal widget feature store keys.
367
+ */
368
+ declare function mapProfileSettingsToFeatures(settings: Partial<AccessibilityPreferences>): Record<string, unknown>;
369
+ /**
370
+ * Maps current live features from the store to typed AccessibilityPreferences.
371
+ */
372
+ declare function mapFeaturesToProfileSettings(features: Record<string, unknown>): Partial<AccessibilityPreferences>;
373
+ /**
374
+ * Atomically applies a profile to the live feature store.
375
+ * Preserves initial base settings in baseSnapshot and initializes empty overrides.
376
+ */
377
+ declare function applyProfileToStore(profileId: ProfilePresetId, currentFeatures: Record<string, unknown>, setFeatureState: <T>(key: string, value: T) => void, existingActiveState?: ActiveProfileState | null): ActiveProfileState;
378
+ /**
379
+ * Reverts an active profile back to custom settings with deterministic override survival.
380
+ * Settings that the user explicitly changed while the profile was active survive at their
381
+ * overridden values; settings untouched by the user revert to their pre-profile base values.
382
+ */
383
+ declare function revertProfileFromStore(activeProfileState: ActiveProfileState, setFeatureState: <T>(key: string, value: T) => void): void;
384
+ /**
385
+ * Records an explicit user override when a setting is modified while a profile is active.
386
+ */
387
+ declare function recordProfileOverride(key: keyof AccessibilityPreferences, value: AccessibilityPreferences[keyof AccessibilityPreferences], activeProfileState: ActiveProfileState | null, setFeatureState: <T>(key: string, value: T) => void): ActiveProfileState | null;
388
+
389
+ interface UseProfilesResult {
390
+ /** All eight predefined accessibility profiles in recommended order. */
391
+ profiles: readonly ProfileDefinition[];
392
+ /** Active profile preset ID or null if none is applied. */
393
+ activeProfileId: ProfilePresetId | null;
394
+ /** Active profile definition or null if none is applied. */
395
+ activeProfile: ProfileDefinition | null;
396
+ /** Complete active profile state including base snapshot and user overrides. */
397
+ activeProfileState: ActiveProfileState | null;
398
+ /** Atomically applies a profile to the store, preserving previous custom settings. */
399
+ applyProfile: (profileId: ProfilePresetId) => void;
400
+ /** Reverts the active profile, retaining any user explicit overrides. */
401
+ revertProfile: () => void;
402
+ /** Returns whether a specific profile preset is currently active. */
403
+ isProfileActive: (profileId: ProfilePresetId) => boolean;
404
+ }
405
+ /**
406
+ * Hook to access and manage accessibility profiles with deterministic override survival.
407
+ */
408
+ declare function useProfiles(): UseProfilesResult;
409
+
355
410
  interface FontSizeControllerProps {
356
411
  /**
357
412
  * Optional custom scale steps (percentages or factors, e.g. [100, 112.5, 125, 150, 200] or [1.0, 1.125, 1.25, 1.5, 2.0]).
@@ -457,6 +512,13 @@ declare function isFunctionalOrMeaningfulImage(el: Element): boolean;
457
512
  */
458
513
  declare function isEligibleDecorativeImage(el: Element): boolean;
459
514
  declare function nudgeReadingAid(feature: "readingGuide" | "readingMask", delta: number): void;
515
+ /**
516
+ * Extracts authored accessible description from an element.
517
+ * Respects author intent, protects private/sensitive fields, and avoids redundant tooltips.
518
+ */
519
+ declare function getAuthoredDescription(element: Element): string | null;
520
+ declare function positionTooltip(tooltip: HTMLElement, target: Element): void;
521
+ declare function enableAccessibleTooltips(): () => void;
460
522
 
461
523
  interface LineHeightControllerProps {
462
524
  /**
@@ -551,6 +613,188 @@ declare const FocusHighlightController: typeof HighlightFocusController;
551
613
  */
552
614
  declare function ReduceMotionController(): react.JSX.Element;
553
615
 
616
+ interface TooltipsControllerProps {
617
+ className?: string;
618
+ label?: string;
619
+ description?: string;
620
+ }
621
+ /**
622
+ * Controller to toggle accessible tooltips for authored descriptions.
623
+ * Displays meaningful alt text, aria-labels, and descriptions on pointer hover and keyboard focus
624
+ * without overwriting semantics, inventing text, or disclosing private fields.
625
+ * Conforms to WCAG 2.1 SC 1.4.13 (Dismissible with Escape, Hoverable, and Persistent).
626
+ */
627
+ declare function TooltipsController({ className, label, description, }: TooltipsControllerProps): react.JSX.Element;
628
+ declare const AccessibleTooltipsController: typeof TooltipsController;
629
+
630
+ interface PageNavigatorControllerProps {
631
+ className?: string;
632
+ label?: string;
633
+ description?: string;
634
+ closeOnNavigate?: boolean;
635
+ }
636
+ /**
637
+ * Controller to explore and navigate the page's semantic outline (Headings H1-H6 and Landmarks).
638
+ * Safely transfers focus and scrolls to elements with temporary tabindex cleanup.
639
+ * Truthfully displays empty states when pages lack headings or landmarks.
640
+ * Automatically synchronizes with dynamic DOM / SPA route changes without observer loops.
641
+ */
642
+ declare function PageNavigatorController({ className, label, description, closeOnNavigate, }: PageNavigatorControllerProps): react.JSX.Element;
643
+ declare const HeadingsNavigatorController: typeof PageNavigatorController;
644
+ declare const PageStructureController: typeof PageNavigatorController;
645
+
646
+ interface HeadingItem {
647
+ id: string;
648
+ level: number;
649
+ text: string;
650
+ element: HTMLElement;
651
+ }
652
+ interface LandmarkItem {
653
+ id: string;
654
+ type: string;
655
+ label: string;
656
+ element: HTMLElement;
657
+ }
658
+ /**
659
+ * Discovers all visible headings (h1-h6 or role="heading") in true DOM tree order,
660
+ * strictly excluding elements within the plugin UI.
661
+ */
662
+ declare function scanHeadings(root?: Document | Element): HeadingItem[];
663
+ /**
664
+ * Discovers all visible landmarks and named navigation anchors in true DOM tree order,
665
+ * strictly excluding elements within the plugin UI.
666
+ */
667
+ declare function scanLandmarks(root?: Document | Element): LandmarkItem[];
668
+ /**
669
+ * Safely scrolls to and focuses a target element.
670
+ * If the element is not naturally focusable, assigns a temporary tabindex="-1"
671
+ * and cleans it up on blur, preventing permanent mutation of host DOM semantics.
672
+ */
673
+ declare function navigateToElement(element: HTMLElement, options?: {
674
+ behavior?: ScrollBehavior;
675
+ onComplete?: () => void;
676
+ }): void;
677
+ /**
678
+ * Subscribes to DOM tree mutations outside the plugin UI without observer loops,
679
+ * refreshing headings/landmarks on dynamic client-side SPA route transitions.
680
+ */
681
+ declare function subscribePageStructure(callback: () => void): () => void;
682
+
683
+ interface ProfilesControllerProps {
684
+ className?: string;
685
+ label?: string;
686
+ description?: string;
687
+ largeControls?: boolean;
688
+ onProfileChange?: (profileId: ProfilePresetId | null) => void;
689
+ }
690
+ /**
691
+ * Controller to preview, apply, and revert eight neutral accessibility profile suggestions.
692
+ * Follows a deterministic override model where user explicit choices survive profile reversal.
693
+ * Guaranteed zero implicit audio, speech synthesis, or microphone activation.
694
+ */
695
+ declare function ProfilesController({ className, label, description, largeControls, onProfileChange, }: ProfilesControllerProps): react.JSX.Element;
696
+ declare const ProfileController: typeof ProfilesController;
697
+ declare const AccessibilityProfilesController: typeof ProfilesController;
698
+
554
699
  declare function ResetController(): react.JSX.Element;
555
700
 
556
- export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, type BigCursorControllerProps, CONTRAST_MODES, CONTRAST_PALETTES, CONTRAST_PROTECTED_SELECTOR, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, ContrastModeController, type ContrastModeValue, type ContrastPalette, type CursorSizePreference, DEFAULT_PREFERENCES, DEFAULT_READING_MASK_HEIGHT, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FocusHighlightController, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideDecorativeImagesController, HideImagesController, type HideImagesControllerProps, HideVideosController, HighlightFocusController, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, MAX_READING_MASK_HEIGHT, MIN_READING_MASK_HEIGHT, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, READING_MASK_HEIGHT_PRESETS, type ReaderMode, ReadingGuideController, type ReadingGuideControllerProps, ReadingMaskController, type ReadingMaskControllerProps, ReduceMotionController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, SkipToMainLink, type SkipToMainLinkProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, findMainLandmark, getScriptSpacingConstraints, hasFinePointer, isEligibleDecorativeImage, isForcedColorsActive, isFunctionalOrMeaningfulImage, isProtectedFromContrast, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isReducedMotionActive, isRtlLocale, normalizePreferenceValue, normalizePreferences, nudgeReadingAid, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, subscribeFinePointer, subscribeForcedColors, subscribeReducedMotion, useAccessibility };
701
+ interface PresetsControllerProps {
702
+ className?: string;
703
+ label?: string;
704
+ description?: string;
705
+ largeControls?: boolean;
706
+ }
707
+ declare function PresetsController({ className, label, description, largeControls, }: PresetsControllerProps): react.JSX.Element;
708
+ declare const CustomPresetsController: typeof PresetsController;
709
+ declare const SettingsImportExportController: typeof PresetsController;
710
+ declare const PresetsBackupController: typeof PresetsController;
711
+
712
+ interface CustomPreset {
713
+ id: string;
714
+ name: string;
715
+ createdAt: string;
716
+ updatedAt?: string;
717
+ settings: Partial<AccessibilityPreferences>;
718
+ }
719
+ interface PresetsExportV1 {
720
+ $schema?: string;
721
+ version: 1;
722
+ app: "accessibility-plugin-react";
723
+ exportedAt: string;
724
+ currentSettings?: Partial<AccessibilityPreferences>;
725
+ presets: CustomPreset[];
726
+ }
727
+ type ImportResult = {
728
+ success: true;
729
+ presets: CustomPreset[];
730
+ currentSettings?: Partial<AccessibilityPreferences>;
731
+ message: string;
732
+ } | {
733
+ success: false;
734
+ error: string;
735
+ };
736
+ /**
737
+ * List of allowed preference keys for privacy-safe storage and export.
738
+ * Strictly excludes any private user data, page text, transcripts, credentials, or session metadata.
739
+ */
740
+ declare const ALLOWED_PREFERENCE_KEYS: readonly ["fontScale", "lineHeight", "letterSpacingEm", "wordSpacingEm", "paragraphSpacingEm", "textAlign", "contrastMode", "highlightLinks", "highlightFocus", "reduceMotion", "hideDecorativeImages", "fontFamily", "cursorSize", "readerMode", "saturation", "tooltips"];
741
+ /**
742
+ * Sanitizes and extracts only valid, privacy-safe accessibility preferences.
743
+ * Discards any private, unknown, or extraneous fields.
744
+ */
745
+ declare function sanitizePreferences(raw: unknown): Partial<AccessibilityPreferences>;
746
+ /**
747
+ * Creates a validated, privacy-safe CustomPreset.
748
+ */
749
+ declare function createCustomPreset(name: string, settings: Partial<AccessibilityPreferences>): CustomPreset;
750
+ /**
751
+ * Validates a single CustomPreset object.
752
+ */
753
+ declare function isValidCustomPreset(item: unknown): item is CustomPreset;
754
+ /**
755
+ * Serializes custom presets and optional current settings into a versioned JSON string.
756
+ */
757
+ declare function exportPresetsToJson(options: {
758
+ presets: CustomPreset[];
759
+ currentSettings?: Partial<AccessibilityPreferences>;
760
+ }): string;
761
+ /**
762
+ * Triggers a browser download of the exported JSON file.
763
+ */
764
+ declare function downloadJsonFile(filename: string, jsonContent: string): void;
765
+ /**
766
+ * Validates and parses an imported JSON string into custom presets and settings.
767
+ * Handles valid v1 envelopes, legacy arrays of presets, legacy flat settings, and returns clear errors on malformed data.
768
+ */
769
+ declare function validateAndParseImport(jsonString: string): ImportResult;
770
+ /**
771
+ * Applies a custom preset's settings to the store.
772
+ */
773
+ declare function applyCustomPresetToStore(preset: CustomPreset, setFeatureState: <T>(key: string, value: T) => void): void;
774
+
775
+ interface UsePresetsResult {
776
+ /** List of all saved user presets. */
777
+ presets: CustomPreset[];
778
+ /** Current active settings mapped to AccessibilityPreferences. */
779
+ currentSettings: Partial<AccessibilityPreferences>;
780
+ /** Saves current configuration as a new named preset. */
781
+ saveCurrentAsPreset: (name: string) => CustomPreset;
782
+ /** Applies a preset by its unique ID. Returns true if found and applied. */
783
+ applyPreset: (presetId: string) => boolean;
784
+ /** Deletes a preset by its unique ID. Returns true if deleted. */
785
+ deletePreset: (presetId: string) => boolean;
786
+ /** Generates a version 1 JSON export of presets and optionally current settings. */
787
+ exportPresets: () => string;
788
+ /** Downloads the exported JSON file to the user's computer. */
789
+ downloadExport: (filename?: string) => void;
790
+ /** Validates and imports presets and settings from a JSON string. */
791
+ importFromJson: (jsonStr: string) => ImportResult;
792
+ /** Reads a File object and imports presets and settings. */
793
+ importFromFile: (file: File) => Promise<ImportResult>;
794
+ }
795
+ /**
796
+ * Hook to manage custom presets and versioned JSON settings import/export.
797
+ */
798
+ declare function usePresets(): UsePresetsResult;
799
+
800
+ export { ALLOWED_PREFERENCE_KEYS, ALL_PROFILE_IDS, AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, AccessibilityProfilesController, type AccessibilityState, AccessibleTooltipsController, type ActiveProfileState, BigCursorController, type BigCursorControllerProps, CONTRAST_MODES, CONTRAST_PALETTES, CONTRAST_PROTECTED_SELECTOR, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, ContrastModeController, type ContrastModeValue, type ContrastPalette, type CursorSizePreference, type CustomPreset, CustomPresetsController, DEFAULT_PREFERENCES, DEFAULT_READING_MASK_HEIGHT, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FocusHighlightController, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, type HeadingItem, HeadingsNavigatorController, HideDecorativeImagesController, HideImagesController, type HideImagesControllerProps, HideVideosController, HighlightFocusController, type ImportResult, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, type LandmarkItem, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, MAX_READING_MASK_HEIGHT, MIN_READING_MASK_HEIGHT, PROFILE_DEFINITIONS, PageNavigatorController, type PageNavigatorControllerProps, PageStructureController, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, PresetsBackupController, PresetsController, type PresetsControllerProps, type PresetsExportV1, ProfileController, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, ProfilesController, type ProfilesControllerProps, READING_MASK_HEIGHT_PRESETS, type ReaderMode, ReadingGuideController, type ReadingGuideControllerProps, ReadingMaskController, type ReadingMaskControllerProps, ReduceMotionController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, SettingsImportExportController, SkipToMainLink, type SkipToMainLinkProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, TooltipsController, type TooltipsControllerProps, type UsePresetsResult, type UseProfilesResult, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, applyCustomPresetToStore, applyProfileToStore, createCustomPreset, createInitialPreferencesState, downloadJsonFile, enLocale, enableAccessibleTooltips, exportPresetsToJson, findMainLandmark, getAuthoredDescription, getProfileDefinition, getScriptSpacingConstraints, hasFinePointer, isEligibleDecorativeImage, isForcedColorsActive, isFunctionalOrMeaningfulImage, isProtectedFromContrast, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isReducedMotionActive, isRtlLocale, isValidCustomPreset, mapFeaturesToProfileSettings, mapProfileSettingsToFeatures, navigateToElement, normalizePreferenceValue, normalizePreferences, nudgeReadingAid, positionTooltip, preferencesReducer, recordProfileOverride, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, revertProfileFromStore, sanitizePreferences, scanHeadings, scanLandmarks, subscribeFinePointer, subscribeForcedColors, subscribePageStructure, subscribeReducedMotion, useAccessibility, usePresets, useProfiles, validateAndParseImport };
package/dist/index.d.ts CHANGED
@@ -38,6 +38,11 @@ interface ProfileDefinition {
38
38
  description: string;
39
39
  settings: Partial<AccessibilityPreferences>;
40
40
  }
41
+ interface ActiveProfileState {
42
+ profileId: ProfilePresetId;
43
+ baseSnapshot: Partial<AccessibilityPreferences>;
44
+ overrides: Partial<AccessibilityPreferences>;
45
+ }
41
46
  interface PreferencesState {
42
47
  /** Base preferences configured before any profile was selected. */
43
48
  base: AccessibilityPreferences;
@@ -68,6 +73,7 @@ type PreferencesAction = {
68
73
  };
69
74
 
70
75
  declare const DEFAULT_PREFERENCES: Readonly<AccessibilityPreferences>;
76
+ declare const ALL_PROFILE_IDS: readonly ProfilePresetId[];
71
77
  declare const PROFILE_DEFINITIONS: Record<ProfilePresetId, ProfileDefinition>;
72
78
 
73
79
  declare function normalizePreferenceValue<K extends keyof AccessibilityPreferences>(key: K, value: unknown): AccessibilityPreferences[K];
@@ -352,6 +358,55 @@ declare function useAccessibility<T>(featureKey: string, defaultValue: T, option
352
358
 
353
359
  declare const AccessibilityContext: react.Context<AccessibilityContextValue | null>;
354
360
 
361
+ /**
362
+ * Retrieves a profile definition by its unique identifier.
363
+ */
364
+ declare function getProfileDefinition(id: ProfilePresetId): ProfileDefinition | undefined;
365
+ /**
366
+ * Maps typed AccessibilityPreferences settings to internal widget feature store keys.
367
+ */
368
+ declare function mapProfileSettingsToFeatures(settings: Partial<AccessibilityPreferences>): Record<string, unknown>;
369
+ /**
370
+ * Maps current live features from the store to typed AccessibilityPreferences.
371
+ */
372
+ declare function mapFeaturesToProfileSettings(features: Record<string, unknown>): Partial<AccessibilityPreferences>;
373
+ /**
374
+ * Atomically applies a profile to the live feature store.
375
+ * Preserves initial base settings in baseSnapshot and initializes empty overrides.
376
+ */
377
+ declare function applyProfileToStore(profileId: ProfilePresetId, currentFeatures: Record<string, unknown>, setFeatureState: <T>(key: string, value: T) => void, existingActiveState?: ActiveProfileState | null): ActiveProfileState;
378
+ /**
379
+ * Reverts an active profile back to custom settings with deterministic override survival.
380
+ * Settings that the user explicitly changed while the profile was active survive at their
381
+ * overridden values; settings untouched by the user revert to their pre-profile base values.
382
+ */
383
+ declare function revertProfileFromStore(activeProfileState: ActiveProfileState, setFeatureState: <T>(key: string, value: T) => void): void;
384
+ /**
385
+ * Records an explicit user override when a setting is modified while a profile is active.
386
+ */
387
+ declare function recordProfileOverride(key: keyof AccessibilityPreferences, value: AccessibilityPreferences[keyof AccessibilityPreferences], activeProfileState: ActiveProfileState | null, setFeatureState: <T>(key: string, value: T) => void): ActiveProfileState | null;
388
+
389
+ interface UseProfilesResult {
390
+ /** All eight predefined accessibility profiles in recommended order. */
391
+ profiles: readonly ProfileDefinition[];
392
+ /** Active profile preset ID or null if none is applied. */
393
+ activeProfileId: ProfilePresetId | null;
394
+ /** Active profile definition or null if none is applied. */
395
+ activeProfile: ProfileDefinition | null;
396
+ /** Complete active profile state including base snapshot and user overrides. */
397
+ activeProfileState: ActiveProfileState | null;
398
+ /** Atomically applies a profile to the store, preserving previous custom settings. */
399
+ applyProfile: (profileId: ProfilePresetId) => void;
400
+ /** Reverts the active profile, retaining any user explicit overrides. */
401
+ revertProfile: () => void;
402
+ /** Returns whether a specific profile preset is currently active. */
403
+ isProfileActive: (profileId: ProfilePresetId) => boolean;
404
+ }
405
+ /**
406
+ * Hook to access and manage accessibility profiles with deterministic override survival.
407
+ */
408
+ declare function useProfiles(): UseProfilesResult;
409
+
355
410
  interface FontSizeControllerProps {
356
411
  /**
357
412
  * Optional custom scale steps (percentages or factors, e.g. [100, 112.5, 125, 150, 200] or [1.0, 1.125, 1.25, 1.5, 2.0]).
@@ -457,6 +512,13 @@ declare function isFunctionalOrMeaningfulImage(el: Element): boolean;
457
512
  */
458
513
  declare function isEligibleDecorativeImage(el: Element): boolean;
459
514
  declare function nudgeReadingAid(feature: "readingGuide" | "readingMask", delta: number): void;
515
+ /**
516
+ * Extracts authored accessible description from an element.
517
+ * Respects author intent, protects private/sensitive fields, and avoids redundant tooltips.
518
+ */
519
+ declare function getAuthoredDescription(element: Element): string | null;
520
+ declare function positionTooltip(tooltip: HTMLElement, target: Element): void;
521
+ declare function enableAccessibleTooltips(): () => void;
460
522
 
461
523
  interface LineHeightControllerProps {
462
524
  /**
@@ -551,6 +613,188 @@ declare const FocusHighlightController: typeof HighlightFocusController;
551
613
  */
552
614
  declare function ReduceMotionController(): react.JSX.Element;
553
615
 
616
+ interface TooltipsControllerProps {
617
+ className?: string;
618
+ label?: string;
619
+ description?: string;
620
+ }
621
+ /**
622
+ * Controller to toggle accessible tooltips for authored descriptions.
623
+ * Displays meaningful alt text, aria-labels, and descriptions on pointer hover and keyboard focus
624
+ * without overwriting semantics, inventing text, or disclosing private fields.
625
+ * Conforms to WCAG 2.1 SC 1.4.13 (Dismissible with Escape, Hoverable, and Persistent).
626
+ */
627
+ declare function TooltipsController({ className, label, description, }: TooltipsControllerProps): react.JSX.Element;
628
+ declare const AccessibleTooltipsController: typeof TooltipsController;
629
+
630
+ interface PageNavigatorControllerProps {
631
+ className?: string;
632
+ label?: string;
633
+ description?: string;
634
+ closeOnNavigate?: boolean;
635
+ }
636
+ /**
637
+ * Controller to explore and navigate the page's semantic outline (Headings H1-H6 and Landmarks).
638
+ * Safely transfers focus and scrolls to elements with temporary tabindex cleanup.
639
+ * Truthfully displays empty states when pages lack headings or landmarks.
640
+ * Automatically synchronizes with dynamic DOM / SPA route changes without observer loops.
641
+ */
642
+ declare function PageNavigatorController({ className, label, description, closeOnNavigate, }: PageNavigatorControllerProps): react.JSX.Element;
643
+ declare const HeadingsNavigatorController: typeof PageNavigatorController;
644
+ declare const PageStructureController: typeof PageNavigatorController;
645
+
646
+ interface HeadingItem {
647
+ id: string;
648
+ level: number;
649
+ text: string;
650
+ element: HTMLElement;
651
+ }
652
+ interface LandmarkItem {
653
+ id: string;
654
+ type: string;
655
+ label: string;
656
+ element: HTMLElement;
657
+ }
658
+ /**
659
+ * Discovers all visible headings (h1-h6 or role="heading") in true DOM tree order,
660
+ * strictly excluding elements within the plugin UI.
661
+ */
662
+ declare function scanHeadings(root?: Document | Element): HeadingItem[];
663
+ /**
664
+ * Discovers all visible landmarks and named navigation anchors in true DOM tree order,
665
+ * strictly excluding elements within the plugin UI.
666
+ */
667
+ declare function scanLandmarks(root?: Document | Element): LandmarkItem[];
668
+ /**
669
+ * Safely scrolls to and focuses a target element.
670
+ * If the element is not naturally focusable, assigns a temporary tabindex="-1"
671
+ * and cleans it up on blur, preventing permanent mutation of host DOM semantics.
672
+ */
673
+ declare function navigateToElement(element: HTMLElement, options?: {
674
+ behavior?: ScrollBehavior;
675
+ onComplete?: () => void;
676
+ }): void;
677
+ /**
678
+ * Subscribes to DOM tree mutations outside the plugin UI without observer loops,
679
+ * refreshing headings/landmarks on dynamic client-side SPA route transitions.
680
+ */
681
+ declare function subscribePageStructure(callback: () => void): () => void;
682
+
683
+ interface ProfilesControllerProps {
684
+ className?: string;
685
+ label?: string;
686
+ description?: string;
687
+ largeControls?: boolean;
688
+ onProfileChange?: (profileId: ProfilePresetId | null) => void;
689
+ }
690
+ /**
691
+ * Controller to preview, apply, and revert eight neutral accessibility profile suggestions.
692
+ * Follows a deterministic override model where user explicit choices survive profile reversal.
693
+ * Guaranteed zero implicit audio, speech synthesis, or microphone activation.
694
+ */
695
+ declare function ProfilesController({ className, label, description, largeControls, onProfileChange, }: ProfilesControllerProps): react.JSX.Element;
696
+ declare const ProfileController: typeof ProfilesController;
697
+ declare const AccessibilityProfilesController: typeof ProfilesController;
698
+
554
699
  declare function ResetController(): react.JSX.Element;
555
700
 
556
- export { AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, type AccessibilityState, BigCursorController, type BigCursorControllerProps, CONTRAST_MODES, CONTRAST_PALETTES, CONTRAST_PROTECTED_SELECTOR, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, ContrastModeController, type ContrastModeValue, type ContrastPalette, type CursorSizePreference, DEFAULT_PREFERENCES, DEFAULT_READING_MASK_HEIGHT, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FocusHighlightController, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, HideDecorativeImagesController, HideImagesController, type HideImagesControllerProps, HideVideosController, HighlightFocusController, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, MAX_READING_MASK_HEIGHT, MIN_READING_MASK_HEIGHT, PROFILE_DEFINITIONS, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, READING_MASK_HEIGHT_PRESETS, type ReaderMode, ReadingGuideController, type ReadingGuideControllerProps, ReadingMaskController, type ReadingMaskControllerProps, ReduceMotionController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, SkipToMainLink, type SkipToMainLinkProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, createInitialPreferencesState, enLocale, findMainLandmark, getScriptSpacingConstraints, hasFinePointer, isEligibleDecorativeImage, isForcedColorsActive, isFunctionalOrMeaningfulImage, isProtectedFromContrast, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isReducedMotionActive, isRtlLocale, normalizePreferenceValue, normalizePreferences, nudgeReadingAid, preferencesReducer, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, subscribeFinePointer, subscribeForcedColors, subscribeReducedMotion, useAccessibility };
701
+ interface PresetsControllerProps {
702
+ className?: string;
703
+ label?: string;
704
+ description?: string;
705
+ largeControls?: boolean;
706
+ }
707
+ declare function PresetsController({ className, label, description, largeControls, }: PresetsControllerProps): react.JSX.Element;
708
+ declare const CustomPresetsController: typeof PresetsController;
709
+ declare const SettingsImportExportController: typeof PresetsController;
710
+ declare const PresetsBackupController: typeof PresetsController;
711
+
712
+ interface CustomPreset {
713
+ id: string;
714
+ name: string;
715
+ createdAt: string;
716
+ updatedAt?: string;
717
+ settings: Partial<AccessibilityPreferences>;
718
+ }
719
+ interface PresetsExportV1 {
720
+ $schema?: string;
721
+ version: 1;
722
+ app: "accessibility-plugin-react";
723
+ exportedAt: string;
724
+ currentSettings?: Partial<AccessibilityPreferences>;
725
+ presets: CustomPreset[];
726
+ }
727
+ type ImportResult = {
728
+ success: true;
729
+ presets: CustomPreset[];
730
+ currentSettings?: Partial<AccessibilityPreferences>;
731
+ message: string;
732
+ } | {
733
+ success: false;
734
+ error: string;
735
+ };
736
+ /**
737
+ * List of allowed preference keys for privacy-safe storage and export.
738
+ * Strictly excludes any private user data, page text, transcripts, credentials, or session metadata.
739
+ */
740
+ declare const ALLOWED_PREFERENCE_KEYS: readonly ["fontScale", "lineHeight", "letterSpacingEm", "wordSpacingEm", "paragraphSpacingEm", "textAlign", "contrastMode", "highlightLinks", "highlightFocus", "reduceMotion", "hideDecorativeImages", "fontFamily", "cursorSize", "readerMode", "saturation", "tooltips"];
741
+ /**
742
+ * Sanitizes and extracts only valid, privacy-safe accessibility preferences.
743
+ * Discards any private, unknown, or extraneous fields.
744
+ */
745
+ declare function sanitizePreferences(raw: unknown): Partial<AccessibilityPreferences>;
746
+ /**
747
+ * Creates a validated, privacy-safe CustomPreset.
748
+ */
749
+ declare function createCustomPreset(name: string, settings: Partial<AccessibilityPreferences>): CustomPreset;
750
+ /**
751
+ * Validates a single CustomPreset object.
752
+ */
753
+ declare function isValidCustomPreset(item: unknown): item is CustomPreset;
754
+ /**
755
+ * Serializes custom presets and optional current settings into a versioned JSON string.
756
+ */
757
+ declare function exportPresetsToJson(options: {
758
+ presets: CustomPreset[];
759
+ currentSettings?: Partial<AccessibilityPreferences>;
760
+ }): string;
761
+ /**
762
+ * Triggers a browser download of the exported JSON file.
763
+ */
764
+ declare function downloadJsonFile(filename: string, jsonContent: string): void;
765
+ /**
766
+ * Validates and parses an imported JSON string into custom presets and settings.
767
+ * Handles valid v1 envelopes, legacy arrays of presets, legacy flat settings, and returns clear errors on malformed data.
768
+ */
769
+ declare function validateAndParseImport(jsonString: string): ImportResult;
770
+ /**
771
+ * Applies a custom preset's settings to the store.
772
+ */
773
+ declare function applyCustomPresetToStore(preset: CustomPreset, setFeatureState: <T>(key: string, value: T) => void): void;
774
+
775
+ interface UsePresetsResult {
776
+ /** List of all saved user presets. */
777
+ presets: CustomPreset[];
778
+ /** Current active settings mapped to AccessibilityPreferences. */
779
+ currentSettings: Partial<AccessibilityPreferences>;
780
+ /** Saves current configuration as a new named preset. */
781
+ saveCurrentAsPreset: (name: string) => CustomPreset;
782
+ /** Applies a preset by its unique ID. Returns true if found and applied. */
783
+ applyPreset: (presetId: string) => boolean;
784
+ /** Deletes a preset by its unique ID. Returns true if deleted. */
785
+ deletePreset: (presetId: string) => boolean;
786
+ /** Generates a version 1 JSON export of presets and optionally current settings. */
787
+ exportPresets: () => string;
788
+ /** Downloads the exported JSON file to the user's computer. */
789
+ downloadExport: (filename?: string) => void;
790
+ /** Validates and imports presets and settings from a JSON string. */
791
+ importFromJson: (jsonStr: string) => ImportResult;
792
+ /** Reads a File object and imports presets and settings. */
793
+ importFromFile: (file: File) => Promise<ImportResult>;
794
+ }
795
+ /**
796
+ * Hook to manage custom presets and versioned JSON settings import/export.
797
+ */
798
+ declare function usePresets(): UsePresetsResult;
799
+
800
+ export { ALLOWED_PREFERENCE_KEYS, ALL_PROFILE_IDS, AccessibilityButton, type AccessibilityButtonProps, AccessibilityContext, type AccessibilityContextValue, AccessibilityList, type AccessibilityListProps, AccessibilityPlugin, type AccessibilityPluginProps, type AccessibilityPreferences, AccessibilityProfilesController, type AccessibilityState, AccessibleTooltipsController, type ActiveProfileState, BigCursorController, type BigCursorControllerProps, CONTRAST_MODES, CONTRAST_PALETTES, CONTRAST_PROTECTED_SELECTOR, ChoiceControl, type ChoiceControlProps, type ChoiceGroup, type ChoiceOption, ContrastController, type ContrastMode, ContrastModeController, type ContrastModeValue, type ContrastPalette, type CursorSizePreference, type CustomPreset, CustomPresetsController, DEFAULT_PREFERENCES, DEFAULT_READING_MASK_HEIGHT, DYSLEXIA_FONT_STACK, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FONT_FAMILY_PRESETS, FONT_FAMILY_PROTECTED_SELECTOR, FeatureCard, type FeatureCardProps, type FeatureOptions, type FeatureRegistration, type FeatureStatus, FocusHighlightController, FontFamilyController, type FontFamilyPreference, type FontFamilyPreset, FontSizeController, type FontSizeControllerProps, GrayscaleController, type HeadingItem, HeadingsNavigatorController, HideDecorativeImagesController, HideImagesController, type HideImagesControllerProps, HideVideosController, HighlightFocusController, type ImportResult, InvertColorsController, LEGIBLE_FONT_STACK, LINE_HEIGHT_RATIOS, LINE_HEIGHT_STEPS, type LandmarkItem, LetterSpacingController, type LetterSpacingControllerProps, LineHeightController, type LineHeightControllerProps, LinkHighlightController, type LocaleStrings, MAX_READING_MASK_HEIGHT, MIN_READING_MASK_HEIGHT, PROFILE_DEFINITIONS, PageNavigatorController, type PageNavigatorControllerProps, PageStructureController, ParagraphSpacingController, type ParagraphSpacingControllerProps, type PluginPosition, PresetsBackupController, PresetsController, type PresetsControllerProps, type PresetsExportV1, ProfileController, type ProfileDefinition, type ProfilePresetId, ProfilePreviewCard, type ProfilePreviewCardProps, ProfilesController, type ProfilesControllerProps, READING_MASK_HEIGHT_PRESETS, type ReaderMode, ReadingGuideController, type ReadingGuideControllerProps, ReadingMaskController, type ReadingMaskControllerProps, ReduceMotionController, ResetController, SaturationController, type SaturationPreference, type ScriptSpacingConstraints, SearchCount, type SearchCountProps, SettingsImportExportController, SkipToMainLink, type SkipToMainLinkProps, StepperControl, type StepperControlProps, type StorageMode, type SupportedLocale, TEXT_ALIGN_BLOCK_SELECTOR, TEXT_SCALE_PROTECTED_SELECTOR, TEXT_SCALE_STEPS, TEXT_SPACING_EXCLUDED_SELECTOR, TextAlignController, type TextAlignPreference, TextScaleController, type TextScaleControllerProps, type TextScaleStep, ToggleControl, type ToggleControlProps, TooltipsController, type TooltipsControllerProps, type UsePresetsResult, type UseProfilesResult, type WidgetPlacement, WordSpacingController, type WordSpacingControllerProps, applyCustomPresetToStore, applyProfileToStore, createCustomPreset, createInitialPreferencesState, downloadJsonFile, enLocale, enableAccessibleTooltips, exportPresetsToJson, findMainLandmark, getAuthoredDescription, getProfileDefinition, getScriptSpacingConstraints, hasFinePointer, isEligibleDecorativeImage, isForcedColorsActive, isFunctionalOrMeaningfulImage, isProtectedFromContrast, isProtectedFromFontFamily, isProtectedFromTextAlign, isProtectedFromTextScale, isProtectedFromTextSpacing, isReducedMotionActive, isRtlLocale, isValidCustomPreset, mapFeaturesToProfileSettings, mapProfileSettingsToFeatures, navigateToElement, normalizePreferenceValue, normalizePreferences, nudgeReadingAid, positionTooltip, preferencesReducer, recordProfileOverride, registerLocale, resolveEffectivePreferences, resolveLocaleStrings, revertProfileFromStore, sanitizePreferences, scanHeadings, scanLandmarks, subscribeFinePointer, subscribeForcedColors, subscribePageStructure, subscribeReducedMotion, useAccessibility, usePresets, useProfiles, validateAndParseImport };