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

[Modal] Modal has aria-hidden set to true, even if keepMounted is true, and it's partly visible. #32039

Closed
2 tasks done
tech-meppem opened this issue Mar 29, 2022 · 0 comments · Fixed by #32055
Closed
2 tasks done
Assignees
Labels
component: modal This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@tech-meppem
Copy link
Contributor

tech-meppem commented Mar 29, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

aria-hidden is always set to true for a closed drawer.
However, in situations (like with Swipeable Edge Drawers), you might not want to have this set.
Overriding via Props does not work, and manually setting is via setAttribute only works until the Modal is updated.

Expected behavior 🤔

If you pass in "aria-hidden" as a prop, it should use that value, instead of always being true.

This line in ModalUnstyled.js:
ariaHidden(modalRef.current, true);
should probably be changed to:
if(props.ariaHidden != false) ariaHidden(modalRef.current, true);
or
ariaHidden(modalRef.current, props.ariaHidden);

After more investigation and testing, just this alone doesn't resolve the problem.

Steps to reproduce 🕹

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.
@tech-meppem tech-meppem added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 29, 2022
@danilo-leal danilo-leal added the component: modal This is the name of the generic UI component, not the React module! label Mar 30, 2022
@mnajdova mnajdova added new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants