UNPKG

@humanmark/sdk-js

Version:

Browser-native JavaScript SDK for Humanmark human verification challenges

37 lines 1.47 kB
/** * Accessibility utilities for Humanmark UI components * Provides ARIA support, focus management, and screen reader announcements */ export declare class AccessibilityManager { private static announcementElement; /** * Announces a message to screen readers * @param message - The message to announce * @param priority - 'polite' waits for current speech, 'assertive' interrupts */ static announce(message: string, priority?: 'polite' | 'assertive'): void; /** * Creates a focus trap within an element * @param container - The container element to trap focus within * @returns Cleanup function to remove the trap */ static createFocusTrap(container: HTMLElement): () => void; /** * Adds ARIA attributes for modal dialogs * @param modal - The modal element * @param labelId - ID of the element that labels the modal * @param descriptionId - ID of the element that describes the modal */ static setupModalAria(modal: HTMLElement, labelId: string, descriptionId?: string): void; /** * Creates a visually hidden but screen reader accessible element * @param content - The content for screen readers * @returns The created element */ static createScreenReaderOnly(content: string): HTMLSpanElement; /** * Cleanup function to remove announcement element */ static cleanup(): void; } //# sourceMappingURL=AccessibilityManager.d.ts.map