diff --git a/functions.php b/functions.php index 1498ee2c..1ced93f1 100755 --- a/functions.php +++ b/functions.php @@ -221,8 +221,6 @@ function twentynineteen_scripts() { wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' ); - wp_enqueue_script( 'twentynineteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); - if ( has_nav_menu( 'menu-1' ) ) { wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.0', true ); wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.0', true ); @@ -236,6 +234,24 @@ function twentynineteen_scripts() { } add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' ); +/** + * Fix skip link focus in IE11. + * + * This does not enqueue the script because it is tiny and because it is only for IE11, + * thus it does not warrant having an entire dedicated blocking script being loaded. + * + * @link https://git.io/vWdr2 + */ +function twentynineteen_skip_link_focus_fix() { + // The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`. + ?> + +