diff --git a/src/components/forms/checkbox/checkbox.tsx b/src/components/forms/checkbox/checkbox.tsx index 17aa6830d..62645d417 100644 --- a/src/components/forms/checkbox/checkbox.tsx +++ b/src/components/forms/checkbox/checkbox.tsx @@ -49,14 +49,14 @@ const StyledCheckbox = styled.input.attrs({ } `; -const StyledIcon = styled(Icon)` +const StyledIcon = styled(Icon).attrs({ ariaHidden: true })` position: absolute; pointer-events: none; `; -const CheckboxLabelTextWrapper = ({ label, required }) => { +const CheckboxLabelTextWrapper = ({ label, required, id }) => { return ( - + {label} {required && *} ); @@ -72,7 +72,10 @@ export const Checkbox = (
} {props.label && ( )} - {errorMessage && {errorMessage}} + {errorMessage && ( + + {errorMessage} + + )}
); }; diff --git a/src/components/forms/file-dropper/file-dropper.tsx b/src/components/forms/file-dropper/file-dropper.tsx index 9cd66a793..7acc443e8 100644 --- a/src/components/forms/file-dropper/file-dropper.tsx +++ b/src/components/forms/file-dropper/file-dropper.tsx @@ -211,7 +211,11 @@ export const FileDropper = ({ $hasErrors={Boolean(errors?.documents)} > - + {!hasFiles && illustration && ( @@ -235,7 +239,7 @@ export const FileDropper = ({ ))} {errors?.documents && ( - + {errors.documents.message as unknown as string} )} diff --git a/src/components/forms/text-area/text-area.tsx b/src/components/forms/text-area/text-area.tsx index 181dc5f3a..5787d6b2c 100644 --- a/src/components/forms/text-area/text-area.tsx +++ b/src/components/forms/text-area/text-area.tsx @@ -46,7 +46,9 @@ export const TextArea = ( )} - {errorMessage && {errorMessage}} + {errorMessage && ( + + {errorMessage} + + )} ); }; diff --git a/src/components/forms/text-input/text-input.tsx b/src/components/forms/text-input/text-input.tsx index db7451bc7..0bccec83e 100644 --- a/src/components/forms/text-input/text-input.tsx +++ b/src/components/forms/text-input/text-input.tsx @@ -65,7 +65,9 @@ export const TextInput = ( )} - {errorMessage && {errorMessage}} + {errorMessage && ( + + {errorMessage} + + )} ); };