/** * Accessibility module for WCAG 2.1 AA compliance * Provides keyboard navigation, screen reader support, and ARIA labels */ export interface A11yConfig { enableKeyboardNav?: boolean; enableScreenReaderAnnouncements?: boolean; ariaLabel?: string; ariaDescribedBy?: string; role?: string; } /** * Generate unique IDs for accessibility attributes */ export declare function generateA11yIds(prefix: string): { container: string; announcer: string; option: (index: number) => string; }; /** * Hook for keyboard navigation in virtualized lists */ export declare function useA11yKeyboardNav({ itemCount, onSelectItem, onSelectIndex, }: { itemCount: number; onSelectItem?: (index: number) => void; onSelectIndex?: (index: number) => void; }): { selectedIndex: number; focusedIndex: number; handleKeyDown: (e: React.KeyboardEvent) => void; }; /** * Screen reader announcements */ export declare function announceToScreenReader(message: string, priority?: 'polite' | 'assertive'): void; /** * Generate ARIA attributes for list items */ export declare function getItemA11yProps(index: number, total: number, isSelected?: boolean): { 'aria-posinset': number; 'aria-setsize': number; 'aria-selected': boolean; role: string; }; /** * Generate ARIA attributes for container */ export declare function getContainerA11yProps(label: string, describedBy?: string): { role: string; 'aria-label': string; 'aria-describedby': string | undefined; 'aria-multiselectable': boolean; }; import React from 'react'; /** * Screen reader friendly virtual list announcement * Announces when list is scrolled or filtered */ export declare function useA11yAnnouncements({ itemCount, filteredCount, searchQuery, isLoading, }: { itemCount: number; filteredCount?: number; searchQuery?: string; isLoading?: boolean; }): void; /** * Ensure keyboard-accessible interactions */ export declare const a11yEventHandlers: { /** * Handle click or Enter/Space key */ onClickOrKey: (callback: () => void) => { onClick: () => void; onKeyDown: (e: React.KeyboardEvent) => void; }; /** * Make any element keyboard accessible */ makeKeyboardAccessible: (element: HTMLElement, callback: () => void) => void; }; /** * Focus management utilities */ export declare const focusManagement: { /** * Set focus with announcement */ focusWithAnnouncement: (element: HTMLElement, message?: string) => void; /** * Trap focus within container (for modals, etc.) */ trapFocus: (container: HTMLElement) => () => void; }; /** * ARIA live region for dynamic content */ export declare class AriaLiveRegion { private region; constructor(priority?: 'polite' | 'assertive'); announce(message: string): void; clear(): void; remove(): void; } /** * Accessibility audit helper */ export declare function auditAccessibility(container: HTMLElement): { warnings: string[]; errors: string[]; }; //# sourceMappingURL=a11y.d.ts.map