department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 203 forks source link

Global | Manage focus on review & submit page on submit error #94687

Open Mottie opened 1 week ago

Mottie commented 1 week ago

What happened?

Describe what went wrong:

When you click on submit button on the review and submit page, focus is lost.

Add the steps to reproduce the bug:

  1. Go to https://staging.va.gov/decision-reviews/test-sc/ and start filling out the form.
  2. Navigate to https://staging.va.gov/decision-reviews/test-sc/review-and-submit
  3. Submit the form without checking the privacy policy checkbox
  4. Note that focus is lost.
  5. Open the "Issues for review" accordion
  6. Edit the first page
  7. Uncheck all issues
  8. Scroll down and submit the form again (skip the "Update page" button)
  9. Note that focus is lost

Add a screen recording or photo:

Image

How severe is the problem?

What is the desired behavior?

  1. When a user activates the submit button, the is focus is shifted.

We should shift focus to the checkbox field of the privacy policy, and if checked and an error alert becomes visible, focus on the alert

Definition of Done

comaurice commented 5 days ago

Pending a code review, CI tests are failing right now