Make WordPress Core

Ticket #36627: 36627.02.patch

File 36627.02.patch, 5.5 KB (added by walbo, 9 years ago)
  • src/wp-admin/css/themes.css

     
    13291329.theme-install-overlay .close-full-overlay,
    13301330.theme-install-overlay .previous-theme,
    13311331.theme-install-overlay .next-theme {
    1332         display: block;
     1332        padding: 0;
    13331333        position: relative;
    13341334        float: left;
    1335         width: 45px;
     1335        width: 48px;
    13361336        height: 45px;
    1337         padding-right: 2px;
    1338         background: #eee;
     1337        background: transparent;
     1338        border: 0;
    13391339        border-right: 1px solid #ddd;
    13401340        color: #444;
    13411341        cursor: pointer;
    1342         text-decoration: none;
     1342        line-height: 1;
    13431343        -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
    13441344        transition: color .1s ease-in-out, background .1s ease-in-out;
    13451345}
     
    13611361.theme-install-overlay .close-full-overlay:before {
    13621362        font: normal 22px/1 dashicons;
    13631363        content: "\f335";
    1364         position: relative;
    1365         top: 7px;
    1366         left: 13px;
    13671364}
    13681365
    13691366.theme-install-overlay .previous-theme:before {
    13701367        font: normal 20px/1 dashicons;
    13711368        content: "\f341";
    1372         position: relative;
    1373         top: 6px;
    1374         left: 14px;
    13751369}
    13761370
    13771371.theme-install-overlay .next-theme:before {
    13781372        font: normal 20px/1 dashicons;
    13791373        content: "\f345";
    1380         position: relative;
    1381         top: 6px;
    1382         left: 13px;
    13831374}
    13841375
    13851376.theme-install-overlay .previous-theme.disabled,
  • src/wp-admin/js/theme.js

     
    572572
    573573                // Disable previous at the zero position
    574574                if ( 0 === this.model.collection.indexOf( current ) ) {
    575                         $themeInstaller.find( '.previous-theme' ).addClass( 'disabled' );
     575                        $themeInstaller.find( '.previous-theme' ).addClass( 'disabled' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
    576576                }
    577577
    578578                // Disable next if the next model is undefined
    579579                if ( _.isUndefined( this.model.collection.at( this.model.collection.indexOf( current ) + 1 ) ) ) {
    580                         $themeInstaller.find( '.next-theme' ).addClass( 'disabled' );
     580                        $themeInstaller.find( '.next-theme' ).addClass( 'disabled' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
    581581                }
    582582        }
    583583});
     
    697697
    698698                // Disable Left/Right when at the start or end of the collection
    699699                if ( this.model.cid === this.model.collection.at(0).cid ) {
    700                         this.$el.find( '.left' ).addClass( 'disabled' );
     700                        this.$el.find( '.left' ).addClass( 'disabled' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
    701701                }
    702702                if ( this.model.cid === this.model.collection.at( this.model.collection.length - 1 ).cid ) {
    703                         this.$el.find( '.right' ).addClass( 'disabled' );
     703                        this.$el.find( '.right' ).addClass( 'disabled' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
    704704                }
    705705        },
    706706
  • src/wp-admin/theme-install.php

     
    251251<script id="tmpl-theme-preview" type="text/template">
    252252        <div class="wp-full-overlay-sidebar">
    253253                <div class="wp-full-overlay-header">
    254                         <a href="#" class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></a>
    255                         <a href="#" class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></a>
    256                         <a href="#" class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></a>
     254                        <button type="button" class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
     255                        <button type="button" class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></button>
     256                        <button type="button" class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></button>
    257257                <# if ( data.installed ) { #>
    258                         <a href="#" class="button button-primary theme-install disabled"><?php _ex( 'Installed', 'theme' ); ?></a>
     258                        <span class="button button-primary theme-install disabled"><?php _ex( 'Installed', 'theme' ); ?></span>
    259259                <# } else { #>
    260260                        <a href="{{ data.install_url }}" class="button button-primary theme-install"><?php _e( 'Install' ); ?></a>
    261261                <# } #>
  • src/wp-admin/themes.php

     
    404404        <div class="theme-backdrop"></div>
    405405        <div class="theme-wrap wp-clearfix">
    406406                <div class="theme-header">
    407                         <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
    408                         <button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
    409                         <button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close details dialog' ); ?></span></button>
     407                        <button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
     408                        <button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
     409                        <button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close details dialog' ); ?></span></button>
    410410                </div>
    411411                <div class="theme-about wp-clearfix">
    412412                        <div class="theme-screenshots">