From: Marius Olbertz Date: Wed, 6 Jul 2016 15:37:34 +0000 (+0200) Subject: Fixes keyboard support for Drilldown. X-Git-Tag: v6.2.4-rc1~47^2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ace2aec002323df2243f73db948dc600967dfd4;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fixes keyboard support for Drilldown. Added tabindex=0 to the sub-menu parents. Because they have no href attribute they were not focusable. --- diff --git a/js/foundation.drilldown.js b/js/foundation.drilldown.js index ca209de50..f7f3d5863 100644 --- a/js/foundation.drilldown.js +++ b/js/foundation.drilldown.js @@ -71,7 +71,7 @@ class Drilldown { if(_this.options.parentLink){ $link.clone().prependTo($sub.children('[data-submenu]')).wrap('
  • '); } - $link.data('savedHref', $link.attr('href')).removeAttr('href'); + $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0); $link.children('[data-submenu]') .attr({ 'aria-hidden': true, @@ -149,6 +149,8 @@ class Drilldown { } }); + console.log('Next:', $nextElement, 'Prev', $prevElement); + Foundation.Keyboard.handleKey(e, 'Drilldown', { next: function() { if ($element.is(_this.$submenuAnchors)) {