Skip to content

bug(dialog/snackbar): a11y - Snackbar contents do not vocalize while dialog is open #26708

Closed
@matt-diehl

Description

@matt-diehl

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When opening a snackbar from within a dialog (with VoiceOver enabled), the snackbar contents are not vocalized. If the snackbar remains on the screen, the contents are vocalized as soon as the dialog is closed.

This is a very similar issue to: #22733

I suspect a similar fix could be applied (adding aria-owns to the dialog for any active snackbars).

Note: I am able to work around this issue by setting the dialog's aria-modal attribute to false.

Reproduction

Steps to reproduce:

  1. Open a dialog
  2. While the dialog is open, trigger a snackbar with VoiceOver enabled.

Repro: https://stackblitz.com/edit/components-issue-kqprn4?file=src%2Fapp%2Fdialog-content-example.ts

Expected Behavior

The snackbar contents should be vocalized

Actual Behavior

The snackbar contents are not vocalized until the dialog is closed (if the snackbar is still visible).

Environment

  • Angular: 15.2.0
  • CDK/Material: 15.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
  • Screen reader: VoiceOver

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/snack-bar

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions