Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dialog] Focus not moving into dialog content when talkback is on #44779

Open
susheelahegde opened this issue Dec 15, 2024 · 4 comments
Open
Assignees
Labels
accessibility a11y component: dialog This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@susheelahegde
Copy link

susheelahegde commented Dec 15, 2024

Steps to reproduce

Steps:

  1. Go to https://stackblitz.com/edit/vitejs-vite-uyj92zhd?file=src%2FApp.tsx,package.json&terminal=dev or https://mui.com/material-ui/react-dialog/
  2. Turn on talkback
  3. Try to access dialog content using swipe.

Current behavior

When talkback is on, the focus does not move inside the content of the dialog. This may be due to the tabIndex=-1 applied to the TransitionComponent. I overrode the TransitionComponent, but after that, the focus is no longer trapped inside the dialog; it moves out, and the focus order becomes incorrect. Please refer to the screen recording for more details.

Expected behavior

When talkback is on, the focus should move into the dialog content automatically when the dialog opens.
The focus should remain trapped within the dialog while it is open, preventing it from moving to elements outside the dialog.
The focus order inside the dialog should follow a logical and meaningful sequence, ensuring accessibility and usability for screen reader users.

Context

Access the content of the dialog when talkback is on.

Your environment

npx @mui/envinfo
System:
    OS: Android 14
  Browsers:
    Chrome: Not Found
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @emotion/react: ^11.10.5 => 11.11.1
    @emotion/styled: ^11.10.5 => 11.11.0
    @mui/base:  5.0.0-alpha.113
    @mui/core-downloads-tracker:  5.15.4
    @mui/icons-material: ^5.11.0 => 5.14.11
    @mui/material: ^5.11.4 => 5.11.4
    @mui/private-theming:  5.15.4
    @mui/styled-engine:  5.14.11
    @mui/styles: ^5.11.4 => 5.15.4
    @mui/system: ^5.11.4 => 5.14.11
    @mui/types:  7.2.13
    @mui/utils:  5.15.4
    @types/react: ^18.0.26 => 18.2.24
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: ^4.9.4 => 4.9.5

Search keywords: A11y

@susheelahegde susheelahegde added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 15, 2024
@mj12albert
Copy link
Member

mj12albert commented Dec 16, 2024

@susheelahegde Thanks for reporting this ~ are you able to repro the issue with the Base UI dialogs in this page? https://www.base-ui.com/react/components/dialog

(We will soon adopt Base UI for Material UI)

@mj12albert mj12albert added accessibility a11y component: dialog This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Dec 16, 2024
@mj12albert mj12albert changed the title [Dialog]: Focus not moving into dialog content when talkback is on [Dialog] Focus not moving into dialog content when talkback is on Dec 16, 2024
@mj12albert mj12albert self-assigned this Dec 16, 2024
@mj12albert mj12albert removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 16, 2024
@DiegoAndai DiegoAndai added this to the Material UI with Base UI milestone Dec 19, 2024
@DiegoAndai
Copy link
Member

Hey @susheelahegde, thanks for the report.

Please refer to the screen recording for more details.

May I ask you to add the screen recording? You seemed to have missed attaching it.

@alyssavo
Copy link

Hi @DiegoAndai, I'm facing the same problem as @susheelahegde. I can recreate this bug with both the drawer component and the dialog component.

It seems to work fine on Firefox on Android, so it looks like this is a Chrome & Talkback problem. I tested the Base UI component, and that works fine.

Screen Recordings:
https://github.com/user-attachments/assets/0e7f5d9b-1dff-4c30-b318-60499433246d
https://github.com/user-attachments/assets/ea4b9dba-c3b9-4943-a2cd-fe0235c74e54

@DiegoAndai
Copy link
Member

I am tentatively scheduling this for the Base UI migration. Still, I'll add the "ready to take" label if someone from the community wishes to investigate and find a solution earlier.

@DiegoAndai DiegoAndai added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: dialog This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

No branches or pull requests

4 participants