Description
Focus on first error in forms
Motivation & Context
After submit, and if the submitted form contains errors, it is convenient to set the focus to the first element that contains an error to achieve better accessibility for persons with disabilities. (https://www.w3.org/WAI/tutorials/forms/notifications/#listing-errors).
Type of changes
-
New feature (non-breaking change which adds functionality)
Checklist
-
I have read the contributing guidelines -
My code follows the code style of the project (using npm run lint
) -
My change introduces changes to the documentation -
I have updated the documentation accordingly -
I have added tests to cover my changes -
All new and existing tests passed