react-waitlist
Version:
A customizable waitlist form component for React applications
43 lines (42 loc) • 1.21 kB
TypeScript
import React, { ReactNode } from 'react';
import { A11yConfig } from '../core/types';
/**
* Context for ARIA attributes and accessibility features
*/
interface AriaContextType {
/** Whether to announce status changes to screen readers */
announceStatus: boolean;
/** Whether to use high contrast mode */
highContrast: boolean;
/** Whether to respect reduced motion preferences */
reducedMotion: 'auto' | boolean;
/** ARIA labels for various elements */
ariaLabels: {
form: string;
emailField: string;
submitButton: string;
successMessage: string;
errorMessage: string;
[key: string]: string;
};
/** Announce a message to screen readers */
announce: (message: string, assertive?: boolean) => void;
}
/**
* Props for the AriaProvider component
*/
interface AriaProviderProps {
/** Accessibility configuration */
config?: A11yConfig;
/** Children components */
children: ReactNode;
}
/**
* Provider component for accessibility features
*/
export declare const AriaProvider: React.FC<AriaProviderProps>;
/**
* Hook to use ARIA context
*/
export declare const useAria: () => AriaContextType;
export {};