WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Cannot activate links with Keyboard

for

From: Patrick H. Lauke
Date: Sep 5, 2018 8:41AM


On 05/09/2018 14:50, Joseph Sherman wrote:
> Hi all. We have a new page going up (https://slu.cuny.edu/) and while I can TAB to the top of page and main menu items ("Prospective Students, Current Students; About, etc.), I cannot activate them with the Enter key on the keyboard (Please ignore the other issues we are working on). I assume it has something to do with the javascript event listener Keydown event, but I'm not sure what the issue is or how to fix it.


no time to deep dive and test, but my hunch would be: in function.js there's

// Keyboard-friendly Navigation
$( 'header ul.menu a' ).on( 'keydown', function( e ) {
if ( e.which != 9 ) {
e.preventDefault();
}
...

Essentially, unless it's the TAB key, this preventDefaults browser
behavior altogether...(e.g. reacting to enter etc).

P
--
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke