WordPress.org

Make WordPress Core

Changeset 21435


Ignore:
Timestamp:
08/05/2012 09:37:57 PM (8 years ago)
Author:
azaozz
Message:

Accessibility: fix the Skip to content link, show it on :focus, improve the styling of the skip links when shown, see #21310, see #21471

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r21305 r21435  
    108108
    109109<div id="wpwrap">
    110 <a id="wpbody-content-shortcut" tabindex="5" href="#wpbody-content" class="hide-if-no-js screen-reader-text"><?php _e('Skip to main content'); ?></a>
     110<a tabindex="1" href="#wpbody-content" class="screen-reader-text screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
    111111<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
    112112<div id="wpcontent">
     
    124124?>
    125125
    126 <div id="wpbody-content" tabindex="-1" aria-label="<?php esc_attr_e('Main content'); ?>">
     126<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>">
    127127<?php
    128128
  • trunk/wp-admin/css/wp-admin.dev.css

    r21399 r21435  
    197197    width: 1px;
    198198    overflow: hidden;
     199}
     200
     201.screen-reader-shortcut:focus {
     202    left: 5px;
     203    top: 5px;
     204    height: auto;
     205    width: auto;
     206    display: block;
     207    padding: 10px 15px;
     208    background: #fff;
     209    color: #000;
     210    border: 2px solid #333;
     211    border-radius: 3px;
     212    z-index: 100000;
    199213}
    200214
  • trunk/wp-admin/js/common.dev.js

    r21310 r21435  
    375375        });
    376376    }
    377 
    378     $('#wpbody-content-shortcut').bind('click.wp-skip-to-content', function(e){
    379         $('#wpbody-content').focus();
    380         e.preventDefault();
    381     });
    382377});
    383378
  • trunk/wp-includes/css/admin-bar.dev.css

    r21425 r21435  
    620620
    621621#wpadminbar #wpadminbar-shortcut:focus {
    622     left: 0;
    623     top: 0;
     622    left: 5px;
     623    top: 5px;
    624624    height: auto;
    625625    width: auto;
     
    628628    background: #fff;
    629629    color: #000;
    630     outline: none;
     630    border: 2px solid #333;
     631    border-radius: 3px;
    631632    z-index: 100000;
    632633    text-shadow: none;
     634    line-height: normal;
    633635}
    634636
Note: See TracChangeset for help on using the changeset viewer.