From: Marius Olbertz Date: Wed, 6 Jul 2016 20:03:56 +0000 (+0200) Subject: Fixed keyboard usage for Accordion Menu. X-Git-Tag: v6.2.4-rc1~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9003%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fixed keyboard usage for Accordion Menu. Tab and shift tab are not handled specially anymore. This allows the focus to not be trapped inside anymore. --- diff --git a/js/foundation.accordionMenu.js b/js/foundation.accordionMenu.js index 663a9819b..d1eeeb5a7 100644 --- a/js/foundation.accordionMenu.js +++ b/js/foundation.accordionMenu.js @@ -34,9 +34,7 @@ class AccordionMenu { 'ARROW_UP': 'up', 'ARROW_DOWN': 'down', 'ARROW_LEFT': 'close', - 'ESCAPE': 'closeAll', - 'TAB': 'down', - 'SHIFT_TAB': 'up' + 'ESCAPE': 'closeAll' }); } @@ -127,6 +125,7 @@ class AccordionMenu { return; } }); + Foundation.Keyboard.handleKey(e, 'AccordionMenu', { open: function() { if ($target.is(':hidden')) { @@ -143,11 +142,11 @@ class AccordionMenu { } }, up: function() { - $prevElement.attr('tabindex', -1).focus(); + $prevElement.focus(); return true; }, down: function() { - $nextElement.attr('tabindex', -1).focus(); + $nextElement.focus(); return true; }, toggle: function() {