-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 dialogs are not accessible #6579
Comments
this relates to focus issues in #9399 https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html |
Perhaps the new dialog HTML element is a natural way to gain accessibility and other desirable behaviors? |
|
Closing as resolved by #14560. |
From web4all hackathon diagram-codesprint#3
Describe the bug
Modal dialogs are not accessible. When a modal dialog is displayed and a screen reader is used, the web page is visible to the screen reader (only the modal dialog should be).
To Reproduce
Expected behavior
The modal dialog should appear as modal to a screen reader
@sinabahram
Initial fix is to add aria-modal="true" and role="dialog" on the containing element for the modal. Because modals are created/destroyed in the DOM upon usage, this should work fine. We then need to examine accessible ways of closing hte modal. There must be an accessible close button, and the escape key needs to also trigger this close button. Lastly, we need to make sure that focus is returned to where it originally was when the modal is closed. This means that jupyterlab needs to remember the last focussed element, and then upon modal close, this element needs to regain focus e.g. by calling .focus() on the reference to that element.
The text was updated successfully, but these errors were encountered: