formik
formik copied to clipboard
The accessibility attribute aria-invalid has an error message instead of a "true" value
Bug report
Current Behavior
This image illustrates the inconsistency of aria-invalid in this code component:
<Field id='xyz' name='xyz' validate={validators.validateEmail(values)} component={TextField} label='Email' fullWidth required />
Expected behavior
When a field has an error, we need to have aria-invalid="true"
Your environment
| Software | Version(s) |
|---|---|
| Formik | 2.4.6 |
| React | 16.13.1 |
| TypeScript | 4.8.4 |
| Browser | Chrome |
| npm/Yarn | 10.8.1 |
| Operating System | Windows 11 |
Hi, I would like to work on this issue! Could you please assign it to me?
Hello @malcyb123 , Since I’m not yet a contributor :), I’m unable to assign this ticket to you. I hope you’ll be able to resolve this issue. Thank you in advance, D.
Hi @tombac2010 , Can you please provide a Code Sandbox link?