[wp-trac] [WordPress Trac] #54421: Deprecate skip link focus fix

WordPress Trac noreply at wordpress.org
Fri Nov 19 22:01:30 UTC 2021


#54421: Deprecate skip link focus fix
-------------------------+-------------------------------------------------
 Reporter:  westonruter  |       Owner:  westonruter
     Type:  enhancement  |      Status:  accepted
 Priority:  low          |   Milestone:  6.0
Component:  Bundled      |     Version:  3.6
  Theme                  |
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |     Focuses:  accessibility, javascript,
                         |  performance
-------------------------+-------------------------------------------------

Comment (by sabernhardt):

 Twenty Seventeen has console errors when removing/dequeuing the skip link
 JS because the `twentyseventeenScreenReaderText` variable used in
 navigation.js and global.js is localized on `twentyseventeen-skip-link-
 focus-fix`. That part might be a bug (on a separate ticket?). If the
 navigation script can follow global, the localization could go on
 `twentyseventeen-global` instead.

 If site owners know they do not need to support IE users, they could
 remove the script with just a single line of code **today** for other
 themes:
 {{{
 // Remove from Twenty Fifteen (similar with twentysixteen).
 add_action( 'wp_enqueue_scripts', function() { wp_dequeue_script(
 'twentyfifteen-skip-link-focus-fix' ); }, 11 );

 // Remove from Twenty Twenty-One (similar with twentynineteen and
 twentytwenty).
 add_action( 'wp', function() { remove_action( 'wp_print_footer_scripts',
 'twenty_twenty_one_skip_link_focus_fix' ); } );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54421#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list