@@ -86,7 +86,20 @@ If you want to override the default snack bar options, you can do so using the
86
86
```
87
87
88
88
### Accessibility
89
- Snack-bar messages are announced via an ` aria-live ` region. Focus is not moved to
90
- the snack-bar element, as this would be disruptive to a user in the middle of a
91
- workflow. For any action offered in the snack-bar, the application should offer the
92
- user an alternative way to perform the action (typically via keyboard shortcut).
89
+ Snack-bar messages are announced via an ` aria-live ` region. By default, the ` polite ` setting is
90
+ used. While ` polite ` is recommended, this can be customized by setting the ` politeness ` property of
91
+ the ` MatSnackBarConfig ` .
92
+
93
+ Focus is not, and should not be, moved to the snack-bar element. Moving the focus would be
94
+ disruptive to a user in the middle of a workflow. It is recommended that, for any action offered
95
+ in the snack-bar, the application offer the user an alternative way to perform the action.
96
+ Alternative interactions are typically keyboard shortcuts or menu options. When the action is
97
+ performed in this way, the snack-bar should be dismissed.
98
+
99
+ Snack-bars that have an action available should not be given a ` duration ` , as to accomodate
100
+ screen-reader users that want to navigate to the snack-bar element to activate the action. If the
101
+ user has manually moved their focus within the snackbar, focus should be placed somewhere sensible
102
+ based on the application context when the snack-bar is dismissed.
103
+
104
+ Don't use "Dismiss" as a snack-bar-action, instead preferring to use a ` duration ` when there is
105
+ no additional action associated with the notification.
0 commit comments