File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,20 @@ <h4 style="margin-bottom: 3px;">configuration</h4>
237
237
</ td >
238
238
< td > Text to display as the action button.</ td >
239
239
</ tr >
240
+ < tr >
241
+ < td > actionTextAria</ td >
242
+ < td >
243
+ < i > Dismiss, Description for Screen Readers</ i >
244
+ </ td >
245
+ < td > Text for screen readers.</ td >
246
+ </ tr >
247
+ < tr >
248
+ < td > alertScreenReader</ td >
249
+ < td >
250
+ < i > false</ i >
251
+ </ td >
252
+ < td > Determines if screen readers will annouce the snackbar message.</ td >
253
+ </ tr >
240
254
< tr >
241
255
< td > actionTextColor</ td >
242
256
< td >
Original file line number Diff line number Diff line change 30
30
showAction : true ,
31
31
actionText : 'Dismiss' ,
32
32
actionTextAria : 'Dismiss, Description for Screen Readers' ,
33
+ alertScreenReader : false ,
33
34
actionTextColor : '#4CAF50' ,
34
35
showSecondButton : false ,
35
36
secondButtonText : '' ,
114
115
) ;
115
116
}
116
117
118
+ if ( options . alertScreenReader ) {
119
+ Snackbar . snackbar . setAttribute ( 'role' , 'alert' ) ;
120
+ }
121
+
117
122
Snackbar . snackbar . addEventListener (
118
123
'transitionend' ,
119
124
function ( event , elapsed ) {
You can’t perform that action at this time.
0 commit comments