Make WordPress Core

Ticket #33228: 33228.diff

File 33228.diff, 4.2 KB (added by afercia, 9 years ago)
  • src/wp-admin/css/themes.css

     
    11821182
    11831183body.full-overlay-active {
    11841184        overflow: hidden;
     1185        /* Hide all the content, the Customizer overlay is then made visible to be the only available content. */
     1186        visibility: hidden;
    11851187}
    11861188
    11871189.wp-full-overlay {
     
    16131615        height: 100%;
    16141616}
    16151617
    1616 .customize-active #customize-container {
    1617         display: block;
     1618/* Make the Customizer and Theme installer overlays the only available content. */
     1619#customize-container,
     1620.theme-install-overlay {
     1621        visibility: visible;
    16181622}
    16191623
    16201624.customize-loading #customize-container iframe {
  • src/wp-admin/js/customize-controls.js

     
    36203620                        return;
    36213621                }
    36223622
    3623                 var parent, topFocus,
     3623                var parent,
    36243624                        body = $( document.body ),
    36253625                        overlay = body.children( '.wp-full-overlay' ),
    36263626                        title = $( '#customize-info .panel-title.site-title' ),
     
    42344234                });
    42354235
    42364236                api.trigger( 'ready' );
    4237 
    4238                 // Make sure left column gets focus
    4239                 topFocus = closeBtn;
    4240                 topFocus.focus();
    4241                 setTimeout(function () {
    4242                         topFocus.focus();
    4243                 }, 200);
    4244 
    42454237        });
    42464238
    42474239})( wp, jQuery );
  • src/wp-admin/js/theme.js

     
    866866        html: themes.template( 'theme-preview' ),
    867867
    868868        render: function() {
    869                 var self = this, currentPreviewDevice,
    870                         data = this.model.toJSON();
     869                var self = this,
     870                        currentPreviewDevice,
     871                        data = this.model.toJSON(),
     872                        $body = $( document.body );
    871873
     874                $body.attr( 'aria-busy', 'true' );
     875
    872876                this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) );
    873877
    874878                currentPreviewDevice = this.$el.data( 'current-preview-device' );
     
    879883                themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } );
    880884
    881885                this.$el.fadeIn( 200, function() {
    882                         $( 'body' ).addClass( 'theme-installer-active full-overlay-active' );
    883                         $( '.close-full-overlay' ).focus();
     886                        $body.addClass( 'theme-installer-active full-overlay-active' );
    884887                });
    885888
    886889                this.$el.find( 'iframe' ).one( 'load', function() {
     
    890893
    891894        iframeLoaded: function() {
    892895                this.$el.addClass( 'iframe-ready' );
     896                $( document.body ).attr( 'aria-busy', 'false' );
    893897        },
    894898
    895899        close: function() {
  • src/wp-includes/js/customize-loader.js

     
    183183                 * Callback after the Customizer has been opened.
    184184                 */
    185185                opened: function() {
    186                         Loader.body.addClass( 'customize-active full-overlay-active' );
     186                        Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' );
    187187                },
    188188
    189189                /**
    190                  * Close the Customizer overlay and return focus to the link that opened it.
     190                 * Close the Customizer overlay.
    191191                 */
    192192                close: function() {
    193193                        if ( ! this.active ) {
     
    209209                        if ( this.originalDocumentTitle ) {
    210210                                document.title = this.originalDocumentTitle;
    211211                        }
    212 
    213                         // Return focus to link that was originally clicked.
    214                         if ( this.link ) {
    215                                 this.link.focus();
    216                         }
    217212                },
    218213
    219214                /**
     
    227222                        Loader.saved     = null;
    228223                        Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' );
    229224                        $( window ).off( 'beforeunload', Loader.beforeunload );
     225                        /*
     226                         * Return focus to the link that opened the Customizer overlay after
     227                         * the body element visibility is restored.
     228                         */
     229                        if ( Loader.link ) {
     230                                Loader.link.focus();
     231                        }
    230232                },
    231233
    232234                /**
     
    233235                 * Callback for the `load` event on the Customizer iframe.
    234236                 */
    235237                loaded: function() {
    236                         Loader.body.removeClass('customize-loading');
     238                        Loader.body.removeClass( 'customize-loading' ).attr( 'aria-busy', 'false' );
    237239                },
    238240
    239241                /**