@@ -90,16 +90,14 @@ Snack-bar messages are announced via an `aria-live` region. By default, the `pol
90
90
used. While ` polite ` is recommended, this can be customized by setting the ` politeness ` property of
91
91
the ` MatSnackBarConfig ` .
92
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 offers the user an alternative way to perform the action.
93
+ Focus is not moved to the snack-bar element as that would be disruptive to a user in the middle of a workflow.
94
+ It is recommended that, for any action offered in the snack-bar, the application offers the user an
95
+ alternative way to perform the action.
96
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.
97
+ performed in this way, the snack-bar should be dismissed. A snack-bar can contain a single action.
98
+ "Dismiss" or "cancel" actions are optional.
98
99
99
100
Snack-bars that have an action available should not be given a ` duration ` , as to accommodate
100
101
screen-reader users that want to navigate to the snack-bar element to activate the action. If the
101
102
user has manually moved their focus within the snackbar, focus should be placed somewhere sensible
102
103
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