Skip to content

Commit

Permalink
feat: add invalid aria tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ngunner15 committed Jan 24, 2025
1 parent 49b3a25 commit 741cf2f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ const InterimStep = ({ isReview }:InterimStepProps) => {
placeholder={pageTexts.storageDate.placeholder}
invalid={state.startDate.isInvalid}
invalidText={pageTexts.storageDate.invalidText}
aria-invalid={state.startDate.isInvalid ? 'true' : 'false'}
readOnly={isFormSubmitted}
autoComplete="off"
/>
Expand Down Expand Up @@ -232,6 +233,7 @@ const InterimStep = ({ isReview }:InterimStepProps) => {
? pageTexts.storageDate.invalidText
: pageTexts.storageDate.invalidDateBeforeCollection
}
aria-invalid={state.endDate.isInvalid ? 'true' : 'false'}
readOnly={isFormSubmitted}
autoComplete="off"
/>
Expand Down Expand Up @@ -275,6 +277,7 @@ const InterimStep = ({ isReview }:InterimStepProps) => {
helperText={pageTexts.storageFacility.otherInput.helperText}
invalid={state.facilityOtherType.isInvalid}
invalidText={pageTexts.storageFacility.otherInput.invalidText}
aria-invalid={state.facilityOtherType.isInvalid ? 'true' : 'false'}
onBlur={(e: React.ChangeEvent<HTMLInputElement>) => {
handleOtherFacilityTypeInput(e.target.value);
}}
Expand Down

0 comments on commit 741cf2f

Please sign in to comment.