Make WordPress Core

Ticket #31204: 31204.diff

File 31204.diff, 2.4 KB (added by celloexpressions, 10 years ago)

The JS doesn't work yet, but looks like we do need JS here.

  • src/wp-admin/css/customize-controls.css

     
    22        overflow: hidden;
    33}
    44
     5.wp-customizer .screen-reader-shortcut:focus {
     6        top: 6px;
     7}
     8
    59#customize-controls a {
    610        text-decoration: none;
    711}
  • src/wp-admin/customize.php

     
    139139
    140140                <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
    141141                <div class="wp-full-overlay-sidebar-content" tabindex="-1">
     142                        <a tabindex="0" href="#customize-preview" class="screen-reader-shortcut preview-shortcut"><?php _e( 'Skip to site preview' ); ?></a>
    142143                        <div id="customize-info" class="accordion-section <?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
    143144                                <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0">
    144145                                        <span class="preview-notice"><?php
     
    174175                </div>
    175176                </div>
    176177
     178                <a tabindex="0" href="#customize-preview" class="screen-reader-shortcut preview-shortcut"><?php _e( 'Skip to site preview' ); ?></a>
    177179                <div id="customize-footer-actions" class="wp-full-overlay-footer">
    178180                        <a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
    179181                                <span class="collapse-sidebar-arrow"></span>
  • src/wp-admin/js/customize-controls.js

     
    22392239                        event.preventDefault();
    22402240                });
    22412241
     2242                $( '.preview-shortcut' ).on( 'click keydown', function( event ) {
     2243                        if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
     2244                                return;
     2245                        }
     2246
     2247                        var test = $( '#customize-preview' ).contents().find( ':focusable' ).first();
     2248                        test.focus();
     2249                        event.preventDefault();
     2250                });
     2251
    22422252                // Bind site title display to the corresponding field.
    22432253                if ( title.length ) {
    22442254                        $( '#customize-control-blogname input' ).on( 'input', function() {