WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Beranek, Nicholas
Date: Sep 22, 2016 11:15AM


WAI-ARIA authoring practices dictate that 'focus must be held within the dialog until it is cancelled or submitted- (http://www.w3.org/TR/wai-aria-practices-1.1/#dialog_modal). Note: This is for modal dialogs. Non-modal dialogs should not trap focus and should be able to be dismissed appropriately (see Jonathan's response related to the F6 key and Brian's the escape key).

--
Nick Beranek
Digital Accessibility Team

On 9/22/16, 1:08 PM, "WebAIM-Forum on behalf of Don Mauck" < <EMAIL REMOVED> on behalf of <EMAIL REMOVED> > wrote:

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)