WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: accessibility of video in modal popups

for

From: Sylvia Richardson
Date: May 12, 2015 2:22PM


Two different methods you could use:

1. Use JavaScript to intercept all focus events when the dialog box is open and redirect the focus to the dialog. Nicholas C. Zakas has some fairly clear instructions and code samples here: [http://www.nczonline.net/blog/2013/02/12/making-an-accessible-dialog-box/]

2. Suppress everything outside the dialog box by adding tabindex="-1" and aria-disabled="true" to any interactive elements outside the dialog. This will prevent users from being able to tab to the elements. Butterfly Lightbox uses this method. [http://irama.org/web/dhtml/butterfly/]

-Sylvia