mui / mui/material-ui

[Snackbar] Screen reader not reading a snackbar when triggered from a button within a dialog

Open
#30,097 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility priority: important scope: toast type: bug
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Current behavior 😯

When snackbars are triggered from a button within a dialog they are not read by the screen reader.

Expected behavior 🤔

When snackbars are triggered from a button within a dialog they should be read by the screen reader.

Steps to reproduce 🕹

Steps

  1. User launches NVDA or JAWS
  2. User opens https://codesandbox.io/s/dialog-snackbar-not-accessible-gzl5o?file=/demo.js in Chrome, Firefox or Edge
  3. User clicks the "OPEN DIALOG" button and the dialog is launched
  4. User clicks the "OPEN SNACKBAR" button within the dialog and the snackbar is launch
  5. The screen reader does not read the snackbar and the user of the assistive technology is unaware the snackbar exists
Context 🔦

We are building forms and flows that combine the dialog and snackbar components. We need some none intrusive alerts that inform users their task was successful. Snackbars fit our need but are not accessible when triggered from a button within a dialog.

Your environment 🌎
`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction in demo.js and reproduce the issue using NVDA or JAWS in a supported browser. Trace how the Snackbar is triggered from the dialog, then verify that the snackbar is announced when opened from the dialog without breaking the dialog interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.