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 dialogs are not accessible #6579

Closed
clapierre opened this issue Jun 14, 2019 · 4 comments
Closed

Modal dialogs are not accessible #6579

clapierre opened this issue Jun 14, 2019 · 4 comments

Comments

@clapierre
Copy link

clapierre commented Jun 14, 2019

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

  1. Launch Jupyter
  2. Select Kernel > Restart Kernel... (to bring a sample modal dialog)

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.

@tonyfast
Copy link
Contributor

tonyfast commented Dec 4, 2020

@jasongrout
Copy link
Contributor

Perhaps the new dialog HTML element is a natural way to gain accessibility and other desirable behaviors?

@tonyfast
Copy link
Contributor

dialog is most likely the best semantics for the container. its probably worth referencing the WAI-ARIA pattern that describes the expectations for a dialog modal with assistive technology.

@krassowski
Copy link
Member

Closing as resolved by #14560.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants