-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix (a11): add aria-invalid to career form fields #817
Conversation
✅ Deploy Preview for satellytes ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking care of this, works great 💪
However, I think that the implementation can still be improved a little. Could you please take a look at the two comments?
fix (a11y): add aria-labeledby to checkbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nice 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that all fields have the aria-required={true}
attribute even if they are not required. Can you please fix this in the scope of this PR?
# Conflicts: # src/components/forms/checkbox/checkbox.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🚀
Changes:
aria-invalid
totrue
for all input components if an error message is therearia-describedby
for all input components to the id of the error message element if there is an errorid
to all error message elementsaria-labelledby
to checkbox if the label is setid
to checkbox labelNote:
Because the useForm is set to
mode: 'onSubmit'
thearia-invalid
flag only changes after the first submit. Changing the mode to'onChange'
would fix that but it would also change the behaviour of the form.