Skip to content

The accessibility attribute aria-invalid has an error message instead of a "true" value #4003

@tombac2010

Description

@tombac2010

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 />

image

Expected behavior

When a field has an error, we need to have aria-invalid="true"
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions