/** * ARIA attribute utilities for form fields * @module form/aria */ /** * Props for a form field with label and error states */ export interface FieldProps { id?: string; label?: string; description?: string; descriptionId?: string; error?: string; errorId?: string; required?: boolean; invalid?: boolean; } /** * Generate ARIA attributes for a form field based on its state * @param props - Field properties * @returns ARIA attributes object * * @example * ```svelte * * * * ``` */ export declare function getFieldAriaAttrs(props: FieldProps): Record; /** * Check if a field has an error state * @param error - Error message or boolean * @returns Whether the field is invalid */ export declare function hasError(error?: string | boolean): boolean; /** * Get the error message to display * @param error - Error message or boolean * @returns Error string or undefined */ export declare function getErrorMessage(error?: string | boolean): string | undefined; /** * Common ARIA roles for form feedback */ export declare const fieldRoles: { /** Role for an alert message */ readonly alert: "alert"; /** Role for status information */ readonly status: "status"; }; /** * Type for ARIA field roles */ export type FieldRole = (typeof fieldRoles)[keyof typeof fieldRoles];