From 0c1477d22b34796dcb03251de4893edb54d477b2 Mon Sep 17 00:00:00 2001 From: AnastasiaBuniak Date: Wed, 25 Nov 2015 12:45:05 +0200 Subject: [PATCH 1/3] JS-324: Fix thumb-arrow tabindex --- lib/web/fotorama/fotorama.js | 4 ++-- lib/web/mage/gallery/gallery.html | 4 ++-- lib/web/mage/gallery/gallery.less | 2 ++ lib/web/mage/gallery/module/_focus.less | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index 2de7213f41ad6..ecd100841261c 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -2633,10 +2633,10 @@ fotoramaVersion = '4.6.4'; } $thumbArrLeft .toggleClass(arrDisabledClass, isLeftDisable) - .attr(disableAttr(isLeftDisable)); + .attr('disabled', isLeftDisable); $thumbArrRight .toggleClass(arrDisabledClass, isRightDisable) - .attr(disableAttr(isRightDisable)); + .attr('disabled', isRightDisable); } function stageWheelUpdate() { diff --git a/lib/web/mage/gallery/gallery.html b/lib/web/mage/gallery/gallery.html index 4ce2961640544..15e9b88a8a657 100644 --- a/lib/web/mage/gallery/gallery.html +++ b/lib/web/mage/gallery/gallery.html @@ -25,13 +25,13 @@
-
+
-
+
diff --git a/lib/web/mage/gallery/gallery.less b/lib/web/mage/gallery/gallery.less index e21f147af0946..ad506868d954d 100644 --- a/lib/web/mage/gallery/gallery.less +++ b/lib/web/mage/gallery/gallery.less @@ -903,6 +903,7 @@ width: @fotorama-thumb-arrow; z-index: @z-index-10; cursor: pointer; + box-shadow: none; .fotorama__thumb--icon { .fotorama-abs-center(); width: 100%; @@ -930,6 +931,7 @@ position: absolute; right: 0; cursor: pointer; + box-shadow: none; z-index: @z-index-10; .fotorama__thumb--icon { .fotorama-rotate(90deg); diff --git a/lib/web/mage/gallery/module/_focus.less b/lib/web/mage/gallery/module/_focus.less index 037a2c3f99602..ea9b9f7dd8cf3 100644 --- a/lib/web/mage/gallery/module/_focus.less +++ b/lib/web/mage/gallery/module/_focus.less @@ -7,7 +7,6 @@ .fotorama__zoom-out:focus, .fotorama__zoom-in:focus, .fotorama__arr:focus, -.fotorama__arr:focus, .fotorama__stage__shaft:focus, .fotorama__nav__frame--thumb:focus .fotorama__thumb, .fotorama__nav__frame--dot:focus .fotorama__dot { From 91f1f398f28019561a210140e48b2e744602fe70 Mon Sep 17 00:00:00 2001 From: AnastasiaBuniak Date: Thu, 26 Nov 2015 11:50:43 +0200 Subject: [PATCH 2/3] JS-324: Fix thumb-arrow tabindex --- lib/web/fotorama/fotorama.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index ecd100841261c..df4044e41d1f2 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -1191,8 +1191,13 @@ fotoramaVersion = '4.6.4'; return !!el.getAttribute('disabled'); } - function disableAttr(FLAG) { - return {tabindex: FLAG * -1 + '', disabled: FLAG}; + function disableAttr(FLAG, disable) { + if (disable) { + return {disabled: FLAG}; + } else { + return {tabindex: FLAG * -1 + '', disabled: FLAG}; + + } } function addEnterUp(el, fn) { @@ -2613,10 +2618,10 @@ fotoramaVersion = '4.6.4'; disableNext = disableDirrection(1); $arrPrev .toggleClass(arrDisabledClass, disablePrev) - .attr(disableAttr(disablePrev)); + .attr(disableAttr(disablePrev, false)); $arrNext .toggleClass(arrDisabledClass, disableNext) - .attr(disableAttr(disableNext)); + .attr(disableAttr(disableNext, false)); } function thumbArrUpdate() { @@ -2633,10 +2638,10 @@ fotoramaVersion = '4.6.4'; } $thumbArrLeft .toggleClass(arrDisabledClass, isLeftDisable) - .attr('disabled', isLeftDisable); + .attr(disableAttr(isLeftDisable, true)); $thumbArrRight .toggleClass(arrDisabledClass, isRightDisable) - .attr('disabled', isRightDisable); + .attr(disableAttr(isRightDisable, true)); } function stageWheelUpdate() { From 4992a2da07273124bf3a8d2ae4032aa4d1a38ab6 Mon Sep 17 00:00:00 2001 From: AnastasiaBuniak Date: Thu, 26 Nov 2015 17:28:22 +0200 Subject: [PATCH 3/3] JS-324: Fix thumb-arrow tabindex --- lib/web/mage/gallery/gallery.less | 2 -- lib/web/mage/gallery/module/_focus.less | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/web/mage/gallery/gallery.less b/lib/web/mage/gallery/gallery.less index ad506868d954d..e21f147af0946 100644 --- a/lib/web/mage/gallery/gallery.less +++ b/lib/web/mage/gallery/gallery.less @@ -903,7 +903,6 @@ width: @fotorama-thumb-arrow; z-index: @z-index-10; cursor: pointer; - box-shadow: none; .fotorama__thumb--icon { .fotorama-abs-center(); width: 100%; @@ -931,7 +930,6 @@ position: absolute; right: 0; cursor: pointer; - box-shadow: none; z-index: @z-index-10; .fotorama__thumb--icon { .fotorama-rotate(90deg); diff --git a/lib/web/mage/gallery/module/_focus.less b/lib/web/mage/gallery/module/_focus.less index ea9b9f7dd8cf3..15b571c80eb79 100644 --- a/lib/web/mage/gallery/module/_focus.less +++ b/lib/web/mage/gallery/module/_focus.less @@ -58,4 +58,9 @@ .fotorama__thumb.fotorama_vertical_ratio:after{ bottom: 1px; } -} \ No newline at end of file +} + +.fotorama__thumb__arr { + box-shadow: none; +} +