Open meredevelopment opened 9 years ago
It's kinda easy to implement, I wouldn't expect it to be inside the plugin, though. In Vanilla JS:
window.addEventListener("keydown", checkKeyPressed, false);
function checkKeyPressed(e) {
if (e.keyCode == "0" || e.keyCode == "32") {
var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
}
}
Hi, I've been checking the a11y of a site that I've used PhotoSwipe on, and I notice that whilst keyboard input is available within a set of images, the initial pop-up state can't be activated with a press of the spacebar. I would love to see this added.