WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Don Mauck
Date: Sep 22, 2016 11:42AM


Agreed.

-----Original Message-----
From: Beranek, Nicholas [mailto: <EMAIL REMOVED> ]
Sent: Thursday, September 22, 2016 11:33 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Keyboard trap for non-modal dialogs and popups:

Let's separate the two components from the subject: 1) non-modal dialogs; and 2) popups. Non-modal dialogs should not trap focus. Popups, which I'll call 'modal dialogs-, should. Remember that we're trying to emulate the default behavior in the operating system. Dialog windows do trap focus, as do alerts and confirm boxes. The window.open method which spawns a classical 'popup- traps focus until you navigate away from the window.

We want to create as seamless an experience from OS to browser, so it would make sense to do this for modal dialogs.

--
Nick Beranek
Digital Accessibility Team

On 9/22/16, 1:17 PM, "WebAIM-Forum on behalf of JP Jamous" < <EMAIL REMOVED> on behalf of <EMAIL REMOVED> > wrote:

That was exactly my thought Don. I wondered if he had a special case though.

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Don Mauck
Sent: Thursday, September 22, 2016 12:08 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Keyboard trap for non-modal dialogs and popups:

Actually keyboard traps are a WCAG violation and should never happen
Snippet: 2.1.2 No Keyboard Trap: If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away. (Level A)


-----Original Message-----
From: JP Jamous [mailto: <EMAIL REMOVED> ]
Sent: Thursday, September 22, 2016 6:10 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Keyboard trap for non-modal dialogs and popups:

Hmm, trapping me inside a modal. I don't think I like the approach Ramakrishnan. The only way I would approve it is if I have a way of getting out.

Think of this.

You trap me inside the modal and I device to press Insert + 7 to pull the list of links on the page, because I decided to go somewhere else. What if JAWS cannot get out of this modal?

Can't you use proper semantic and put the cursor at the top of the modal and let the browser handle the tabindex and navigation?

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Ramakrishnan Subramanian
Sent: Thursday, September 22, 2016 5:30 AM
To: <EMAIL REMOVED>
Subject: [WebAIM] Keyboard trap for non-modal dialogs and popups:

Dear members
I request for your inputs on the following thing.

Is it a good practice to trap the keyboard focus inside the popup or a non-modal dialog?
I mean, while using arrow keys and tab/shift tab keys, trapping the focus inside the popup.
Generally the mouse user is able to access the parent page and also the popup simultaneously.
Should this be the case for the keyboard only users and screen reader users?
Which approach would be recommendable here?
What are the pros and cons for both the approaches?

Thanks for your inputs
Ramakrishnan
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.