WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Keyboard trap for non-modal dialogs and popups:

for

From: Jonathan Avila
Date: Sep 22, 2016 6:57AM


> Is it a good practice to trap the keyboard focus inside the popup or a non-modal dialog?

For modals, you would want to trap the focus. For non-modals in my opinion it depends on whether the non-modal overlaps the other page content. If the non-modal slides into place or doesn't significantly cover other content then in my opinion it should not trap focus. The non-modal's boundaries should be communicated via the role dialog with the new aria-modal attribute or through another mechanism such as a region where a name can be assigned and the boundary of the popup will then be exposed to users of assistive technology. If the non-modal covers most of the page but allows the user to click out then we'd really need to examine why this is. For example, is the user expected to review information between the non-modal and the main page content, etc. In some cases a non-modal may really be a sidebar such as a chat window and keeping the focus order in the chat window is actually helpful to the user. But the user would need a way to move focus between the different panes much like the user would do on the Windows desktop with F6. So it depends on how the content is presented and how the user is expected to interact with the non-modal and page content.

Jonathan

Jonathan Avila
Chief Accessibility Officer
SSB BART Group
<EMAIL REMOVED>
703.637.8957 (Office)
Visit us online: Website | Twitter | Facebook | Linkedin | Blog
Check out our Digital Accessibility Webinars!