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
281 stars 197 forks source link

[CST] Change Notification placement on the files page #87180

Open skylerschain opened 2 months ago

skylerschain commented 2 months ago

Value Proposition

As a veteran taking submission actions in CST, I want to see a clear indicator, consistently placed telling me that my action was either successful or not, so that I get the information I need to confirm my task was complete or take the action again.

Background Context

There are a few scenarios where we want to show a notification banner in the claim detail page to confirm (or deny) a user action. They are all on the Files tab:

  1. After user successfully uploads a file to a claim in the Files tab
  2. After user file upload fails to go through
  3. After a user submits a file on the Document Request page (in response to an evidence request)
  4. After a user agrees they have submitted all evidence in the Ask for your claim decision (current functionality)
  5. After a user agrees they have submitted all evidence in a 5103 Notice (new functionality when flag cst5103UpdateEnabled is true)

Currently this confirmation banner is showing up at the top of the details page for #1, #3, #4 and #5 (see convo about this in this ticket).

2 is showing up within the Files tab under the "Claim files" header and subheader. Note: this is due to the error occurring in that component. (AdditionalEvidencePage.jsx)

Screenshot 2024-06-27 at 12.05.10 PM.png

We should standardize the behavior of these alerts so that they show up in the same place, have the same dimensions, and our scroll position and focus are set to the same place consistently across all of them.

Outcome, Success Measure, KPI(S), and Tracking Link

Design

The design preference is to place all confirmations where #2 is currently showing up, within the files tab content. This keeps the user focus within the Files tab, where the interaction to add files is taking place. We need to ensure that scroll position and focus are set appropriately so that users will see this banner on all screen sizes.

Another, less optimal, option would be to keep the confirmation banner above the Files tab -- see a reproduction of this in a local environment in the screenshot below:

Screenshot 2024-06-27 at 1.22.01 PM.png

Enablement team (if needed)

@jstrothman

Engineering

Some things to note about this...

Out of scope

Open questions

Tasks

Definition of Done

Acceptance Criteria

davidakennedy commented 1 month ago

Are there any a11y considerations to consider?

Here are some initial thoughts. There are a few things to consider:

Focus management and announcement of messages

From the looks of the messages within the notifications, these all seem important enough to alert the Veteran right away. So we need to make sure the headings in the notifications get announced to screen readers and other assistive technology. It looks like these notifications come after the Veteran takes an action. Like activating a button, etc. Let me know if I'm wrong there. To accomplish this, as Skylar, points out in the ticket, we can move focus to the headings of the notifications. Doing this will announce the headings in screen readers and other assistive technology.

Location on page

This is the more challenging aspect here since the notifications look like they populate on the page in different locations (according to the screenshots). Some are above the secondary navigation, and some are below it, within the content of the Files menu so to speak. In an ideal world, these would be near the top of the (after h1) because they rise to that level of importance visually, to match how we're shifting focus to the headings for assistive technology. Also, locating the notifications near the top of the page has the added benefit that no information is skipped for assistive technology.

Locating the notifications below the secondary menu, within the content of the Files menu so to speak means that assistive technology users may not realize that content is above where their focus has shifted. That may not be entirely a bad thing, but we should think through whether any content above the notifications would be important for Veterans to easily get at, depending on when the notifications happen in the experience.

Consistency

Ultimately, I'd like to see the location of the notifications be consistent across the experience. That way, it's a more predictable experience for Veterans. Recognizing that might be challenging depending on what the notifications are related to. Would all these notifications be able to fall into the same location, or do they relate to different things?

cc: @skylerschain