Make WordPress Core

Changeset 59857


Ignore:
Timestamp:
02/22/2025 01:36:54 AM (20 months ago)
Author:
joedolson
Message:

Bundled Theme: A11y: Fix skip link in Twenty Ten.

Fix the source positioning of the skip link in Twenty Ten and add CSS for visibility on focus.

Props anonymized_3085, iammattthomas, joedolson, sabernhardt, shailu25, mukesh27, poena.
Fixes #14795.

Location:
trunk/src/wp-content/themes/twentyten
Files:
2 edited

Legend:

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

    r59344 r59857  
    6464<?php wp_body_open(); ?>
    6565<div id="wrapper" class="hfeed">
     66        <?php // Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. ?>
     67        <a href="#content" class="screen-reader-text skip-link"><?php _e( 'Skip to content', 'twentyten' ); ?></a>
    6668        <div id="header">
    6769                <div id="masthead">
    … …  
    102104
    103105                        <div id="access" role="navigation">
    104                                 <?php // Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. ?>
    105                                 <div class="skip-link screen-reader-text"><a href="#content"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
    106106                                <?php
    107107                                /*
  • trunk/src/wp-content/themes/twentyten/style.css

    r59832 r59857  
    349349}
    350350
     351a.skip-link:focus {
     352        background-color: #ddd;
     353        clip-path: none;
     354        color: #333;
     355        display: block;
     356        font-size: 16px;
     357        height: auto;
     358        left: 5px;
     359        line-height: 1.5;
     360        padding: 16px 24px;
     361        text-decoration: none;
     362        top: 5px;
     363        width: auto;
     364        z-index: 100000;
     365}
    351366
    352367/* =Header
Note: See TracChangeset for help on using the changeset viewer.