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

[Select] "&ZeroWidthSpace" is being rendered as child element #41515

Closed
tejasparkar opened this issue Mar 16, 2024 · 10 comments · Fixed by #44631
Closed

[Select] "&ZeroWidthSpace" is being rendered as child element #41515

tejasparkar opened this issue Mar 16, 2024 · 10 comments · Fixed by #44631
Assignees
Labels
accessibility a11y bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! component: text field This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@tejasparkar
Copy link

tejasparkar commented Mar 16, 2024

Steps to reproduce

Link to live example: (required)

Steps:
1.Open the url https://mui.com/material-ui/react-select/
2. Inspect the code in browser
3. Try navigation with screen reader and observe
Capture

Current behavior

<span className="notranslate">&#8203;</span>

<Button {...buttonProps}>
    {renderValue(selectedOptionsMetadata) ?? placeholder ?? (
      // fall back to a zero-width space to prevent layout shift
      // from https://github.com/mui/material-ui/pull/24563
      <span className="notranslate">&#8203;</span>
    )}
  </Button>

No response

Expected behavior

<Button {...buttonProps}>
    {renderValue(selectedOptionsMetadata) ?? placeholder ?? (
      // fall back to a zero-width space to prevent layout shift
      // from https://github.com/mui/material-ui/pull/24563
      <span aria-hidden="true" className="notranslate">&#8203;</span>
    )}
  </Button>

No response

Context

No response

Your environment

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

Search keywords: accessibility

@tejasparkar tejasparkar added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 16, 2024
@zannager zannager added the component: select This is the name of the generic UI component, not the React module! label Mar 18, 2024
@danilo-leal danilo-leal changed the title Zerowidthspace is rendered as child element in the "select" component [material-ui][Select] "&ZeroWidthSpace" is being rendered as child element Mar 18, 2024
@danilo-leal danilo-leal added the package: material-ui Specific to @mui/material label Mar 18, 2024
@mj12albert mj12albert added bug 🐛 Something doesn't work accessibility a11y and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 22, 2024
@maryamabdi76
Copy link

@mj12albert I can work on this issue.

@tejasparkar
Copy link
Author

#41656

@ZeeshanTamboli
Copy link
Member

@tejasparkar What's the problem with the screen reader announcing? What is it announcing incorrectly?

@ZeeshanTamboli ZeeshanTamboli added the status: waiting for author Issue with insufficient information label Apr 28, 2024
Copy link

github-actions bot commented May 5, 2024

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

@github-actions github-actions bot closed this as completed May 5, 2024
@arionkoder-fmazzoni
Copy link

arionkoder-fmazzoni commented Oct 11, 2024

@ZeeshanTamboli sorry to revive this, but the issue is that screen readers are reading the ZeroWidthSpace, tried this on MacOS Chrome with VoiceOver

Can this be reopened or can we try a new pr to fix this a11y issue?

@ZeeshanTamboli
Copy link
Member

I'll reopen it but I can't confirm it's an issue. I use Windows OS.

@ZeeshanTamboli ZeeshanTamboli removed the status: waiting for author Issue with insufficient information label Oct 25, 2024
@mj12albert
Copy link
Member

Sorry for not getting to this earlier 🙏

I agree aria-hidden is the right solution here

@tejasparkar would you still like to work on this?

@mj12albert mj12albert added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Oct 29, 2024
@arishoham
Copy link
Contributor

@mj12albert I have a PR to fix it, mind helping me get it merged? #44631

@oliviertassinari oliviertassinari changed the title [material-ui][Select] "&ZeroWidthSpace" is being rendered as child element [Select] "&ZeroWidthSpace" is being rendered as child element Dec 2, 2024
@oliviertassinari oliviertassinari added component: text field This is the name of the generic UI component, not the React module! and removed package: material-ui Specific to @mui/material labels Dec 2, 2024
Copy link

github-actions bot commented Dec 4, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@tejasparkar How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@ben-pomelo
Copy link
Contributor

Thanks for fixing this! I found a very similar issue: #44740 and put up a straightforward fix: #44731 would love it if you'd take a look @mj12albert or @mnajdova ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! component: text field This is the name of the generic UI component, not the React module! ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants