Topic: Button Keyboard Accessibility?

I've noticed that 1.5.1 doesn't have keyboard accessible expand buttons.  Any chance this can be resolved somehow?

Re: Button Keyboard Accessibility?

You could create a custom JavaScript event listener in your gallery's embedding page which triggers the Juicebox-Pro API toggleExpand() method (to expand/close the gallery) when a certain key is pressed.
Here's an example which toggles the gallery's expanded status when the 'x' key is pressed.

To see this example in action, create a sample gallery with JuiceboxBuilder-Pro and use the following code as the gallery's 'index.html' page.

<!DOCTYPE html>
<html lang="en">
        <meta charset="utf-8" />
        <meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
            body {
                margin: 0px;
        <script src="jbcore/juicebox.js"></script>
            var jb = new juicebox({
                containerId: "juicebox-container",
                galleryHeight: "400",
                galleryWidth: "600"
            jb.onInitComplete = function() {
                window.addEventListener('keydown', function(e) {
                    if (e.keyCode === 88) {
        <div id="juicebox-container"></div>


(1) Use of the Juicebox-Pro API requires Juicebox-Pro. Unfortunately, this will not work with Juicebox-Lite.

(2) This should work fine with a regular gallery or when useFullscreenExpand="TRUE" but it will not work if the gallery is expanded in a new page (e.g. on an iOS device or when expandInNewPage="TRUE"). In order to close a gallery which has been expanded in a new page, the code would need to be incorporated into the gallery's 'jbcore/full.html' page as well as the gallery's embedding page.

(3) Keycodes (if you wanted to change the 'x' key for something else) can be found here: … -keycodes/

As this does not work with Juicebox-Lite, you might like to post this as a suggestion for a future version in the Feature Requests forum thread.
I do not know what suggestions might be incorporated into future versions but this is the best place for all ideas to ensure that they are seen by the developers. (I know the Feature Requests forum thread is a sub-forum of the Juicebox-Pro forum but there's no specific Feature Requests thread for Juicebox-Lite so this is still the best place to post.)
Thank you.

Re: Button Keyboard Accessibility?

I think this might be undocumented but try 'F' to expand the gallery (fullscreen) and ESC to close the gallery.


(1) Juicebox-Pro only (set enableKeyboardControls="TRUE").

(2) The gallery must have focus (need to click somewhere within the gallery before pressing 'F' (or any other keyboard control)).

(3) As with the example in my previous post, this does not work if the gallery is expanded in a new page (no easy solution).