[material-ui][dialog] form dialog has invalid aria role in docs
Steps to reproduce
Example from mui documentation:
Steps:
- open form dialog
- launch chrome lighthouse tool
Current behavior
The form dialog example has an invalid aria role.
The form element needs to wrap both the DialogContent and DialogActions in order to work correctly, doing this will break the scroll-ability of a dialog with content longer than the window.
Expected behavior
It should not have an aria role issue, or it should allow DialogContent scroll-ability when there is a form element wrapping DialogTitle, DialogContent and DialogActions.
Context
No response
Your environment
This is in the mui docs.
Search keywords: accessibility dialog form
Hey there, @objectfoo; thanks for opening the issue! I'm not being able to see this error myself, though, either through running Lighthouse or PageSpeed Insights (however, I do see another accessibility-related error regarding the lack of associated labels, even though there's the aria-labelledby attribute already 🤔).
You're not seeing it on the Form Dialog example on the dialog docs? Where it uses PaperProps to change the component to a form? I think this is the issue, form is not allowed to have role="dialog".
Open the dialog and then run lighthouse without reloading
Same thing is happening to my QA on some of my user code.