-
Notifications
You must be signed in to change notification settings - Fork 292
Description
What kind of issue is this? (put 'x' between the square brackets)
-
[X ] Bug report. If you’ve found a bug, you must provide a minimal example in a CodePen,
starting from http://jsfiddle.net/JNsu6/15/ . -
[X ] Feature Request. Make sure there's no good way to do what you want first;
consider asking on http://stackoverflow.com/questions/ask first.
This is half-feature-request-half-bug since bad focus management is really bad for accessibility. As detailed in "Learning to focus()", when users toggle open the lightbox, the keyboard focus should be shifted to/inside the modal. Just as importantly, focus should be returned to the element that triggered the lightbox when it's closed.
Yes, this could be implemented with custom functions and the available events provided by featherlight (as in #151), but there's no reason why it shouldn't be baked in. I could even imagine a shiftFocusTo argument with a select for specifying the best element in the lightbox to receive focus (form field, close button, etc.)
See also: "Managing focus for modal dialogs"