Make WordPress Core

Changeset 59914


Ignore:
Timestamp:
03/03/2025 08:35:34 PM (8 weeks ago)
Author:
joedolson
Message:

Bundled Themes: Twenty Fourteen: Move skip link to top of body.

Move the skip link to the top of the body content, so it is the first focusable item on the page.

Props joedolson, abcd95, manojmaharrshi, vganavda, shailu25.
Fixes #62969.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r59907 r59914  
    3434<?php wp_body_open(); ?>
    3535<div id="page" class="hfeed site">
     36    <a class="screen-reader-text skip-link" href="#content">
     37        <?php
     38        /* translators: Hidden accessibility text. */
     39        _e( 'Skip to content', 'twentyfourteen' );
     40        ?>
     41    </a>
    3642    <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?>
    3743    <?php if ( get_header_image() ) : ?>
     
    5864            <nav id="primary-navigation" class="site-navigation primary-navigation">
    5965                <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
    60                 <a class="screen-reader-text skip-link" href="#content">
    61                     <?php
    62                     /* translators: Hidden accessibility text. */
    63                     _e( 'Skip to content', 'twentyfourteen' );
    64                     ?>
    65                 </a>
    6666                <?php
    6767                wp_nav_menu(
Note: See TracChangeset for help on using the changeset viewer.