graycoreio / daffodil

Angular Ecommerce PWA Framework
https://next.daff.io
MIT License
154 stars 27 forks source link

feat(design): add accessibility considerations to the notification component #2900

Closed xelaint closed 1 week ago

xelaint commented 1 week ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Notification's accessibility considerations are not comprehensive enough.

Fixes: #2891

What is the new behavior?

  1. warn and danger statuses have a role="alert"
  2. notifications with actions also have a role="alert"
  3. all other notifications (i.e. default (no status), success status) have a role="status"

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information