carbon-react
Version:
A library of reusable React components for easily building user interfaces.
15 lines (14 loc) • 444 B
TypeScript
export default function useInputAccessibility({ id, validationRedesignOptIn, error, warning, info, label, fieldHelp, }: {
id: string;
validationRedesignOptIn?: boolean;
error?: string | boolean;
warning?: string | boolean;
info?: string | boolean;
label?: React.ReactNode;
fieldHelp?: React.ReactNode;
}): {
labelId?: string;
validationId?: string;
fieldHelpId?: string;
ariaDescribedBy?: string;
};