mui / mui/material-ui

Pressing escape on an open MUI native select component will also close the dialog it is rendered in when running VoiceOver Screen Reader

Open
#26,822 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Version: 4.9.2
Bug type: Accessibility
Browsers: Chrome & Safari
Screen Reader: VoiceOver

For an MUI native Select component that is rendered in an MUI Dialog component, pressing the 'escape' key to close the Select component also closes the dialog when the VoiceOver screenreader is running.

Expected Behavior 🤔

  • Pressing the 'escape' key when the Select component is displaying it's list of options should only close the Select component.
  • Dialog should remain open.
  • Select component should maintain focus when closed.

Steps to Reproduce 🕹

Steps:

  1. Go to https://codesandbox.io/s/material-ui-dialog-close-by-esc-forked-z7ow7?file=/src/TestDialog.js
  2. Enable VoiceOver screen reader (Cmd + F5 on Mac)
  3. Click the button to open the dialog and tab navigate to the native Select component
  4. Use the 'down' key to display the list of options
  5. Press the 'escape' key
  6. Select and dialog should close

Context 🔦

Screen reader users filling a form on an MUI dialog will have all progress lost and will have to fill the form again.

Your Environment 🌎

OS: Mac Big Sur
Browsers: Chrome & Safari
Screen Reader: VoiceOver

`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/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 and inspect the MUI Select and Dialog components involved in the VoiceOver Escape flow. Confirm that Escape closes only the Select, leaves the Dialog open, and restores Select focus; verify the behavior in Chrome and Safari with VoiceOver.

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
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.