WordPress.org

Make WordPress Core

Ticket #14798: extra-skip-link.patch

File extra-skip-link.patch, 1.9 KB (added by elfin, 8 years ago)
  • header.php

     
    8080
    8181                        <div id="access" role="navigation">
    8282                          <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    83                                 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
     83                                <ul class="skip-link screen-reader-text">
     84                                        <li><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></li>
     85                                        <li><a href="#primary" title="<?php esc_attr_e( 'Jump to menu', 'twentyten' ); ?>"><?php _e( 'Jump to menu', 'twentyten' ); ?></a></li>
     86                                </ul>                           
    8487                                <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
    8588                                <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    8689                        </div><!-- #access -->
  • style.css

     
    324324}
    325325
    326326/* Text meant only for screen readers */
    327 .screen-reader-text {
    328         position: absolute;
     327.screen-reader-text,
     328#access .screen-reader-text a{
     329        position: relative;
    329330        left: -9000px;
     331        top: -9000px;
     332        height: 1px;
    330333}
     334.screen-reader-text {
     335        margin: 0;
     336        padding: 0;
     337        list-style-type: none;
     338}
     339#access .screen-reader-text a:active,
     340#access .screen-reader-text a:focus {
     341        position: relative;
     342        left: 9000px;
     343        top: 8962px;
     344        height: auto;
     345        color: #fdbc0a;
     346        background: #000;
     347}
    331348
    332 
    333349/* =Header
    334350-------------------------------------------------------------- */
    335351