GCTC-NTGC / gc-accessibility-passport

https://gc-accessibility-passport-psi.vercel.app
1 stars 0 forks source link

Add AlertDialog component; Update SelectRoleDialog component #200

Closed mnigh closed 1 year ago

mnigh commented 2 years ago

Notes

Although the Alert Dialog component is the right one for the scenario, the lack of a dismiss button where the focus should begin on open on the least destructive action button (close) makes the SelectRoleDialog component less accessible and does not allow the user to escape from the screen. Adding a [least destructive action] button (ex. X icon) to close the screen in the top right-hand corner would achieve this as well as start the focus on an element that would appear before the buttons and therefore make it easier for a screen reader user to navigate to the title and description paragraphs rather than have to listen to it all being read out (for when using the Dialog (Modal)). If the least destructive action button cannot be an option, than an inferior and less accessible solution exists but would require some text to appear in the modal:

The only time you shouldn't close the dialog on dismiss is when the dialog requires a choice and none of them are "cancel". For example, perhaps two records need to be merged and the user needs to pick the surviving record. Neither choice is less destructive than the other, in these cases you may want to alert the user they need to a make a choice on dismiss instead of closing the dialog.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
gc-accessibility-passport ✅ Ready (Inspect) Visit Preview Jun 29, 2022 at 1:46AM (UTC)