[Modal] Modal has aria-hidden set to true, even if keepMounted is true, and it's partly visible. #32039
Closed
2 tasks done
Labels
component: modal
This is the name of the generic UI component, not the React module!
new feature
New feature or request
Duplicates
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);
orariaHidden(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`
The text was updated successfully, but these errors were encountered: