newjersey / navigator.business.nj.gov

NJ Office of Innovation is building a one-stop dashboard to better help New Jerseyans with starting and managing a business
https://business.nj.gov
17 stars 1 forks source link

feat: [#186324885] agent information checkbox missing proper notifica… #9035

Closed adidner closed 3 days ago

adidner commented 4 days ago

…tion

Description

We have a checkbox on step 3 of formation that locks some fields and pre populates them. This isn't announced and should be instead moving forward.

Ticket

This pull request resolves #186324885.

Approach

Steps to Test

Go to step 3 of formation, turn on screen reader cmd + F5

Navigate to the checkbox,

Check it,

See that it announces additional context regarding what happened

Notes

This was a whole mess and a half.

We wanted to announce the change and I was super on the fence about just trying to have context visible on the page be enough vs announcing and leaving that aria live region on the page to then later be discovered and having that aria-live region disappear after a few seconds so as to not confuse a screen reader user when they returned.

I went with the second option and I think in our case it is quite clear but I still don't love it and am not 100% confident I've made best decision.

At a minimum I did do research, and consulted a number of people so I think I've done the best I could with the context available to me at the moment.

(The change text is discoverable and divides the UX of the page for screen reader users in that their note block changes to be the alert message whereas a sighted user doesn't have this experience, I think this is reasonable and clear if not a little less than idea in that it's a bit complex and dividing UX is not a great practice. )

Code author checklist

adidner commented 3 days ago

LGTM! I think you should do a show and tell on this, it can help us include these notifications in the initial iteration instead of going back to it. Good job, Aaron! good to merge after fixing the failing integration tests

A good suggestion, I think that would be great to talk about aria-live and making sure dynamic changes are announced.

Although to be completely honest I'm not as confident as I'd like to be that this is 100% the best way to do this. This is kind of an area where the guidelines haven't really fully caught up to how normal apps work and I'm not sure I understand edge cases well enough to advise on general best practices.

I do want to learn and perhaps I'll consult an expert as digging hasn't gotten me much further recently