Skip to content

Commit

Permalink
feedback @hkhalil-akamai
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-akamai committed Dec 4, 2024
1 parent b317a03 commit fd53887
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ui/src/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export const TextField = (props: TextFieldProps) => {
fallbackId);

const helperTextId = `${validInputId}-helper-text`;
const errorTextId = `${validInputId}-error-text`;

const labelSuffixText = required
? '(required)'
Expand Down Expand Up @@ -325,6 +326,7 @@ export const TextField = (props: TextFieldProps) => {
marginTop: theme.spacing(),
}}
data-qa-textfield-helper-text
id={helperTextId}
>
{helperText}
</FormHelperText>
Expand Down Expand Up @@ -373,6 +375,8 @@ export const TextField = (props: TextFieldProps) => {
}}
inputProps={{
'aria-describedby': helperText ? helperTextId : undefined,
'aria-errormessage': errorText ? errorTextId : undefined,
'aria-invalid': !!error || !!errorText,
'data-testid': 'textfield-input',
id: validInputId,
...inputProps,
Expand Down

0 comments on commit fd53887

Please sign in to comment.