Function: getAriaDescribedBy()
getAriaDescribedBy(
id:string,error?:string,helpText?:string):string|undefined
Defined in: src/components/AddSiteForm/form-utils.ts:70
Determines the appropriate aria-describedby value for a form field.
Parametersโ
idโ
string
The unique field ID.
error?โ
string
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error message, if present.
helpText?โ
string
Help text, if present.
Returnsโ
string | undefined
The aria-describedby value or undefined if neither error nor helpText is present.
Remarksโ
If both error and helpText are present, error takes precedence for accessibility.