]> _ Git - fluidbook-html5.git/commitdiff
wip #3757 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 17 Jul 2020 10:06:25 +0000 (12:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 17 Jul 2020 10:06:25 +0000 (12:06 +0200)
js/libs/fluidbook/fluidbook.accessibility.js
style/interface.less

index fac1b05ef161184e9a290e62da47eb25426db35e..cb9b30180b7a0a8174cb2d6869cef3d0f0560522 100644 (file)
@@ -80,9 +80,11 @@ FluidbookAccessibility.prototype = {
         set_css(':focus{outline:0}::-moz-focus-inner{border:0;}');
     });
 
-    add_event_listener('keydown', function () {
-        $('body').addClass('keyboard-navigating');
-        set_css('');
+    add_event_listener('keydown', function (e) {
+        if(e.keyCode===9) {
+            $('body').addClass('keyboard-navigating');
+            set_css('');
+        }
     });
 
 })(document);
\ No newline at end of file
index faec04376fbbff16d4e374f9d65b18f54c2b2021..789d3d7fdaa148ec3fe42b3ffa623262cb795132 100644 (file)
     left: 0;
     width: 100%;
 
-    &:hover, &:focus {
+    &:hover{
       svg {
         transform: translateX(5px);
       }
     }
 
+    &:focus{
+      .keyboard-navigating &{
+        svg {
+          transform: translateX(5px);
+        }
+      }
+    }
+
     svg {
       transition: transform 250ms;
       position: absolute;
 
 #prev-arrows {
   a {
-    &:hover, &:focus {
+    &:hover {
       svg {
         transform: translateX(-5px);
       }
     }
 
+    &:focus{
+      .keyboard-navigating & {
+        svg {
+          transform: translateX(-5px);
+        }
+      }
+    }
+
     &.arrow-top {
       svg {
         left: 17px;