Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
added aria-live and role attrs to toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbaud-conorwright committed Apr 30, 2018
1 parent e548824 commit c6c847b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/modules/toast/toast-container.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<div class="sky-toaster">
<div
role="alert"
class="sky-toaster">
<sky-toast
*ngFor="let message of messages | async"
[message]="message">
Expand Down
11 changes: 6 additions & 5 deletions src/modules/toast/toast-messages/toast.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<aside>
<div
class="sky-toast"
[ngClass]="{'sky-toast-info': message.toastType=='info',
'sky-toast-warning': message.toastType=='warning',
'sky-toast-danger': message.toastType=='danger',
'sky-toast-success': message.toastType=='success',
'sky-toast-closing': message.isClosing | async}">
[ngClass]="{'sky-toast-info': message.toastType==='info',
'sky-toast-warning': message.toastType==='warning',
'sky-toast-danger': message.toastType==='danger',
'sky-toast-success': message.toastType==='success',
'sky-toast-closing': message.isClosing | async}"
[attr.aria-live]="message.toastType==='danger' ? 'assertive' : 'polite'">
<div
class="sky-toast-content"
(click)="message.close()">
Expand Down

0 comments on commit c6c847b

Please sign in to comment.