From 6ede7f1f84eb1a24d94e4910f7a8b802d0a93f3f Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Wed, 25 Apr 2018 13:16:42 -0700 Subject: [PATCH] docs(snack-bar): expand a11y guidance --- src/lib/snack-bar/snack-bar.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/lib/snack-bar/snack-bar.md b/src/lib/snack-bar/snack-bar.md index eef66603ff2b..3429675cc11f 100644 --- a/src/lib/snack-bar/snack-bar.md +++ b/src/lib/snack-bar/snack-bar.md @@ -86,7 +86,20 @@ If you want to override the default snack bar options, you can do so using the ``` ### Accessibility -Snack-bar messages are announced via an `aria-live` region. Focus is not moved to -the snack-bar element, as this would be disruptive to a user in the middle of a -workflow. For any action offered in the snack-bar, the application should offer the -user an alternative way to perform the action (typically via keyboard shortcut). +Snack-bar messages are announced via an `aria-live` region. By default, the `polite` setting is +used. While `polite` is recommended, this can be customized by setting the `politeness` property of +the `MatSnackBarConfig`. + +Focus is not, and should not be, moved to the snack-bar element. Moving the focus would be +disruptive to a user in the middle of a workflow. It is recommended that, for any action offered +in the snack-bar, the application offer the user an alternative way to perform the action. +Alternative interactions are typically keyboard shortcuts or menu options. When the action is +performed in this way, the snack-bar should be dismissed. + +Snack-bars that have an action available should not be given a `duration`, as to accomodate +screen-reader users that want to navigate to the snack-bar element to activate the action. If the +user has manually moved their focus within the snackbar, focus should be placed somewhere sensible +based on the application context when the snack-bar is dismissed. + +Don't use "Dismiss" as a snack-bar-action, instead preferring to use a `duration` when there is +no additional action associated with the notification.