diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-11-01 19:02:50 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-11-01 19:02:50 +0100 |
| commit | 1becc513c36e30ffe7cc967613485fa39d05f203 (patch) | |
| tree | a47c359b44df36f822553cd66ddd8f0ebc88cb34 /StoneIsland/www/js/vendor/imageviewer.js | |
| parent | c75e4f0b5fc83548e337af6c533036baec8c85c9 (diff) | |
v1.2.5
Diffstat (limited to 'StoneIsland/www/js/vendor/imageviewer.js')
| -rw-r--r-- | StoneIsland/www/js/vendor/imageviewer.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/StoneIsland/www/js/vendor/imageviewer.js b/StoneIsland/www/js/vendor/imageviewer.js index 847c6070..d80ae7ed 100644 --- a/StoneIsland/www/js/vendor/imageviewer.js +++ b/StoneIsland/www/js/vendor/imageviewer.js @@ -85,7 +85,7 @@ //add a full screen view $(function () { if(!$body.length) $body = $('body'); - $body.append('<div id="iv-container">' + imageViewHtml + '<div class="iv-close"></div><div>'); + $body.append('<div id="iv-container">' + imageViewHtml + '<div class="iv-close" role="button" aria-label="Close this image."></div><div>'); imageViewHtml = null }); @@ -674,10 +674,10 @@ height: handleHeight + '%' }); }, - show: function (image, hiResImg) { + show: function (image, hiResImg, message) { if (this._fullPage) { this.container.show(); - if (image) this.load(image, hiResImg); + if (image) this.load(image, hiResImg, message); } }, hide: function () { @@ -701,9 +701,10 @@ $window.off(eventSuffix); return null; }, - load: function (image, hiResImgSrc) { + load: function (image, hiResImgSrc, message) { var self = this, container = this.container; + message = message || 'Viewing high-resolution image. Pinch to zoom or tap to close.' container.find('.iv-snap-image,.iv-large-image').remove(); var snapImageWrap = this.container.find('.iv-snap-image-wrap'); @@ -711,9 +712,11 @@ var snapImage = new Image snapImage.className = 'iv-snap-image' snapImage.src = image + snapImage.setAttribute('aria-label', message) var largeImage = new Image largeImage.className = 'iv-large-image' + largeImage.setAttribute('aria-label', message) var hiResImg; |
