Skip to content
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 / Improve form validation on account page #168

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

MelissaDTH
Copy link

@MelissaDTH MelissaDTH commented Mar 28, 2024

This PR

  • Fixes the logic of the aria-invalid attribute on the TextField component, to ensure it is true when an error occurs if a value is inputted
    • The DemoConfigDialog and PersonalDetailsForm snapshot files are also updated, where errors are intentionally being passed. As a result, aria-invalid is correctly set to true for these affected fields
  • We ensure that the red error message disappears upon submit. If the API returns any errors, we re-display the error message (this is conform the Sign Up and Sign In flow)
    • In the Account component, we currently utilise the Form component. Ideally, it should be refactored to follow the useForm flow similar to the RegistrationForm. However, this is a big refactor. Because of that, we're unable to utilize a handleBlur event for validation after a new input (which was originally wanted in the ticket).
  • Solves: OTT-970

@MelissaDTH MelissaDTH temporarily deployed to Deployment Previews March 28, 2024 16:28 — with GitHub Actions Inactive
Copy link

@royschut royschut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏄‍♂️

Copy link

@langemike langemike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MelissaDTH MelissaDTH temporarily deployed to Deployment Previews April 2, 2024 09:43 — with GitHub Actions Inactive
@MelissaDTH MelissaDTH merged commit 4f12a5a into feat/accessibility-sprint-4 Apr 2, 2024
7 checks passed
@MelissaDTH MelissaDTH deleted the fix/account-page-validation branch April 2, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants