Current Path : /storage/v11800/andslite-new/public_html/wp-content/plugins/jetpack/_inc/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/andslite-new/public_html/wp-content/plugins/jetpack/_inc/accessible-focus.js |
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' );
} );