Make WordPress Core

Ticket #33184: 33184.patch

File 33184.patch, 10.8 KB (added by afercia, 10 years ago)
  • src/wp-admin/css/common.css

     
    712712.postbox .hndle,
    713713.stuffbox .hndle,
    714714.control-section .accordion-section-title,
     715.control-section .was-accordion-section-title,
    715716.sidebar-name,
    716717#nav-menu-header,
    717718#nav-menu-footer,
     
    29592960        background: #fff;
    29602961}
    29612962
    2962 .accordion-section-title {
     2963.accordion-section-title,
     2964.was-accordion-section-title {
    29632965        margin: 0;
    29642966        padding: 12px 15px 15px;
    29652967        position: relative;
     
    29993001        display: none;
    30003002}
    30013003
    3002 .control-section .accordion-section-title {
     3004.control-section .accordion-section-title,
     3005.control-section .was-accordion-section-title {
    30033006        border-left: none;
    30043007        border-right: none;
    30053008        padding: 10px 10px 11px 14px;
  • src/wp-admin/css/customize-controls.css

     
    5757        margin-bottom: 15px;
    5858}
    5959
    60 #customize-controls .customize-info .accordion-section-title {
     60#customize-controls .customize-info .accordion-section-title,
     61#customize-controls .customize-info .was-accordion-section-title {
    6162        background: #fff;
    6263        color: #555;
    6364        border-left: none;
     
    383384        display: block;
    384385}
    385386
    386 .panel-meta.customize-info .accordion-section-title {
     387.panel-meta.customize-info .accordion-section-title,
     388.panel-meta.customize-info .was-accordion-section-title {
    387389        margin-left: 48px;
    388390}
    389391
  • src/wp-admin/css/customize-nav-menus.css

     
    686686
    687687#available-menu-items .accordion-section-title .no-items,
    688688#available-menu-items .cannot-expand .accordion-section-title .spinner,
    689 #available-menu-items .cannot-expand .accordion-section-title > button {
     689#available-menu-items .cannot-expand .accordion-section-title button {
    690690        display: none;
    691691}
    692692
    693 #available-menu-items-search.cannot-expand .accordion-section-title .spinner {
     693#available-menu-items-search.cannot-expand .was-accordion-section-title .spinner {
    694694        display: block;
    695695}
    696696
     
    813813}
    814814
    815815#available-menu-items .accordion-section-title.loading .spinner,
    816 #available-menu-items-search.loading .accordion-section-title .spinner {
     816#available-menu-items-search.loading .was-accordion-section-title .spinner {
    817817        visibility: visible;
    818818        margin: 0 20px;
    819819}
    820820
    821 #available-menu-items-search .clear-results {
     821#available-menu-items-search .was-accordion-section-title .clear-results {
    822822        position: absolute;
    823823        top: 20px;
    824824        right: 20px;
  • src/wp-admin/customize.php

     
    148148                <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 -->
    149149                <div class="wp-full-overlay-sidebar-content" tabindex="-1">
    150150                        <div id="customize-info" class="accordion-section customize-info">
    151                                 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>">
     151                                <div class="was-accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>">
    152152                                        <span class="preview-notice"><?php
    153153                                                echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' );
    154154                                        ?></span>
    155                                         <button class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
     155                                        <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
    156156                                </div>
    157157                                <div class="customize-panel-description"><?php
    158158                                        _e( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' );
  • src/wp-admin/js/customize-controls.js

     
    11491149
    11501150                        meta = panel.container.find( '.panel-meta:first' );
    11511151
    1152                         meta.find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) {
    1153                                 if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    1154                                         return;
    1155                                 }
    1156                                 event.preventDefault(); // Keep this AFTER the key filter above
     1152                        meta.find( '.customize-help-toggle' ).on( 'click', function( event ) {
    11571153
    11581154                                meta = panel.container.find( '.panel-meta' );
    11591155                                if ( meta.hasClass( 'cannot-expand' ) ) {
     
    30593055                });
    30603056
    30613057                // Expand/Collapse the main customizer customize info.
    3062                 $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) {
    3063                         if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    3064                                 return;
    3065                         }
    3066                         event.preventDefault(); // Keep this AFTER the key filter above
     3058                $( '.customize-info' ).find( '.customize-help-toggle' ).on( 'click', function( event ) {
    30673059
    30683060                        var section = $( this ).closest( '.accordion-section' ),
    30693061                                content = section.find( '.customize-panel-description:first' );
  • src/wp-admin/js/customize-nav-menus.js

     
    138138                        } );
    139139
    140140                        // Clear the search results.
    141                         $( '.clear-results' ).on( 'click keydown', function( event ) {
    142                                 if ( event.type === 'keydown' && ( 13 !== event.which && 32 !== event.which ) ) { // "return" or "space" keys only
    143                                         return;
    144                                 }
    145 
    146                                 event.preventDefault();
    147 
     141                        $( '.clear-results' ).on( 'click', function( event ) {
    148142                                $( '#menu-items-search' ).val( '' ).focus();
    149                                 event.target.value = '';
    150143                                self.search( event );
    151144                        } );
    152145
     
    202195                                $otherSections.fadeOut( 100 );
    203196                                $searchSection.find( '.accordion-section-content' ).slideDown( 'fast' );
    204197                                $searchSection.addClass( 'open' );
    205                                 $searchSection.find( '.clear-results' )
    206                                         .prop( 'tabIndex', 0 )
    207                                         .addClass( 'is-visible' );
     198                                $searchSection.find( '.clear-results' ).addClass( 'is-visible' );
    208199                        } else if ( '' === event.target.value ) {
    209200                                $searchSection.removeClass( 'open' );
    210201                                $otherSections.show();
    211                                 $searchSection.find( '.clear-results' )
    212                                         .prop( 'tabIndex', -1 )
    213                                         .removeClass( 'is-visible' );
     202                                $searchSection.find( '.clear-results' ).removeClass( 'is-visible' );
    214203                        }
    215                        
     204
    216205                        this.searchTerm = event.target.value;
    217206                        this.pages.search = 1;
    218207                        this.doSearch( 1 );
  • src/wp-includes/class-wp-customize-nav-menus.php

     
    713713                                </h3>
    714714                        </div>
    715715                        <div id="available-menu-items-search" class="accordion-section cannot-expand">
    716                                 <div class="accordion-section-title">
     716                                <div class="was-accordion-section-title">
    717717                                        <label class="screen-reader-text" for="menu-items-search"><?php _e( 'Search Menu Items' ); ?></label>
    718718                                        <input type="text" id="menu-items-search" placeholder="<?php esc_attr_e( 'Search menu items&hellip;' ) ?>" aria-describedby="menu-items-search-desc" />
    719719                                        <p class="screen-reader-text" id="menu-items-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p>
    720720                                        <span class="spinner"></span>
    721                                         <span class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></span>
     721                                        <button type="button" class="clear-results not-a-button"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button>
    722722                                </div>
    723723                                <ul class="accordion-section-content" data-type="search"></ul>
    724724                        </div>
  • src/wp-includes/class-wp-customize-panel.php

     
    366366        protected function content_template() {
    367367                ?>
    368368                <li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
    369                         <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
    370                         <div class="accordion-section-title">
     369                        <button type="button" class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
     370                        <div class="was-accordion-section-title">
    371371                                <span class="preview-notice"><?php
    372372                                        /* translators: %s is the site/panel title in the Customizer */
    373373                                        echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
    374374                                ?></span>
    375                                 <button class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
     375                                <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
    376376                        </div>
    377377                        <# if ( data.description ) { #>
    378378                                <div class="description customize-panel-description">
     
    458458                        <button type="button" class="customize-panel-back" tabindex="-1">
    459459                                <span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
    460460                        </button>
    461                         <div class="accordion-section-title">
     461                        <div class="was-accordion-section-title">
    462462                                <span class="preview-notice">
    463463                                        <?php
    464464                                        /* Translators: %s is the site/panel title in the Customizer. */
  • src/wp-includes/class-wp-customize-section.php

     
    352352                        <ul class="accordion-section-content">
    353353                                <li class="customize-section-description-container">
    354354                                        <div class="customize-section-title">
    355                                                 <button class="customize-section-back" tabindex="-1">
     355                                                <button type="button" class="customize-section-back" tabindex="-1">
    356356                                                        <span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
    357357                                                </button>
    358358                                                <h3>