react-uswds icon indicating copy to clipboard operation
react-uswds copied to clipboard

fix: validate DatePicker on blur

Open elijah-wright opened this issue 7 months ago • 2 comments

Summary

this PR fixes the skipped tests in DatePicker.test.tsx by adjusting DatePicker to validate on blur rather than with a useEffect hook, which matches with USWDS. it also sets the aria-invalid attribute and uses reportValidity to send VALIDATION_MESSAGE to the user. this PR also changes some of the tests that were dependent on the useEffect behavior

Related Issues or PRs

none

How To Test

yarn test

elijah-wright avatar Jun 07 '25 18:06 elijah-wright

@elijah-wright hello! i noticed this is marked Draft. is this PR still being worked on?

abbyoung avatar Aug 27 '25 17:08 abbyoung

yea, I just wanted more feedback first, esp because I also added sending validation to the user

elijah-wright avatar Aug 27 '25 17:08 elijah-wright