native HTML modal dialog support is buggy
fstrr opened this issue · 1 comments
When a native HTML modal dialog element is open, browsers hide the content on the underlying page from assistive technology. For example: VoiceOver, NVDA, and JAWS will only list content (landmarks, headings, etc.) in the open modal dialog.
The current version of the extension doesn't pick up on the modal dialog being open or closed by the user. For example: if I have a page with a main
element in it, and a modal dialog with a main
element in it, when the dialog is opened and closed, the extension doesn't update to list the current main
landmark.
Here's a test case in codepen. Note: you'll have to put the page into "debug mode" for the test case to work correctly.
Thank you @fstrr for your clear bug report and test case. I'd planned to reply only when I had a fix, but I have still not been able to investigate, beyond confirming the issue. I suspect it's happening because showing the modal is not triggering a mutation event, but if that's the case I'm really not sure how to detect the dialog. I do hope to look into it more fully soon. For now, thanks again for the great test case.