Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
jetpack
/
_inc
:
accessible-focus.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
var keyboardNavigation = false, keyboardNavigationKeycodes = [ 9, 32, 37, 38, 39, 40 ]; // keyCodes for tab, space, left, up, right, down respectively document.addEventListener( 'keydown', function ( event ) { if ( keyboardNavigation ) { return; } if ( keyboardNavigationKeycodes.indexOf( event.keyCode ) !== -1 ) { keyboardNavigation = true; document.documentElement.classList.add( 'accessible-focus' ); } } ); document.addEventListener( 'mouseup', function () { if ( ! keyboardNavigation ) { return; } keyboardNavigation = false; document.documentElement.classList.remove( 'accessible-focus' ); } );