Ticket #33228: 33228.diff
File 33228.diff, 4.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/themes.css
1182 1182 1183 1183 body.full-overlay-active { 1184 1184 overflow: hidden; 1185 /* Hide all the content, the Customizer overlay is then made visible to be the only available content. */ 1186 visibility: hidden; 1185 1187 } 1186 1188 1187 1189 .wp-full-overlay { … … 1613 1615 height: 100%; 1614 1616 } 1615 1617 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; 1618 1622 } 1619 1623 1620 1624 .customize-loading #customize-container iframe { -
src/wp-admin/js/customize-controls.js
3620 3620 return; 3621 3621 } 3622 3622 3623 var parent, topFocus,3623 var parent, 3624 3624 body = $( document.body ), 3625 3625 overlay = body.children( '.wp-full-overlay' ), 3626 3626 title = $( '#customize-info .panel-title.site-title' ), … … 4234 4234 }); 4235 4235 4236 4236 api.trigger( 'ready' ); 4237 4238 // Make sure left column gets focus4239 topFocus = closeBtn;4240 topFocus.focus();4241 setTimeout(function () {4242 topFocus.focus();4243 }, 200);4244 4245 4237 }); 4246 4238 4247 4239 })( wp, jQuery ); -
src/wp-admin/js/theme.js
866 866 html: themes.template( 'theme-preview' ), 867 867 868 868 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 ); 871 873 874 $body.attr( 'aria-busy', 'true' ); 875 872 876 this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) ); 873 877 874 878 currentPreviewDevice = this.$el.data( 'current-preview-device' ); … … 879 883 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } ); 880 884 881 885 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' ); 884 887 }); 885 888 886 889 this.$el.find( 'iframe' ).one( 'load', function() { … … 890 893 891 894 iframeLoaded: function() { 892 895 this.$el.addClass( 'iframe-ready' ); 896 $( document.body ).attr( 'aria-busy', 'false' ); 893 897 }, 894 898 895 899 close: function() { -
src/wp-includes/js/customize-loader.js
183 183 * Callback after the Customizer has been opened. 184 184 */ 185 185 opened: function() { 186 Loader.body.addClass( 'customize-active full-overlay-active' ) ;186 Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' ); 187 187 }, 188 188 189 189 /** 190 * Close the Customizer overlay and return focus to the link that opened it.190 * Close the Customizer overlay. 191 191 */ 192 192 close: function() { 193 193 if ( ! this.active ) { … … 209 209 if ( this.originalDocumentTitle ) { 210 210 document.title = this.originalDocumentTitle; 211 211 } 212 213 // Return focus to link that was originally clicked.214 if ( this.link ) {215 this.link.focus();216 }217 212 }, 218 213 219 214 /** … … 227 222 Loader.saved = null; 228 223 Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' ); 229 224 $( 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 } 230 232 }, 231 233 232 234 /** … … 233 235 * Callback for the `load` event on the Customizer iframe. 234 236 */ 235 237 loaded: function() { 236 Loader.body.removeClass( 'customize-loading');238 Loader.body.removeClass( 'customize-loading' ).attr( 'aria-busy', 'false' ); 237 239 }, 238 240 239 241 /**