Changeset 38520
- Timestamp:
- 09/04/2016 09:50:22 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/themes.css
r38172 r38520 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 … … 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 -
trunk/src/wp-admin/js/customize-controls.js
r38513 r38520 3621 3621 } 3622 3622 3623 var parent, topFocus,3623 var parent, 3624 3624 body = $( document.body ), 3625 3625 overlay = body.children( '.wp-full-overlay' ), … … 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 -
trunk/src/wp-admin/js/theme.js
r38218 r38520 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 ); 873 874 $body.attr( 'aria-busy', 'true' ); 871 875 872 876 this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) ); … … 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 … … 891 894 iframeLoaded: function() { 892 895 this.$el.addClass( 'iframe-ready' ); 896 $( document.body ).attr( 'aria-busy', 'false' ); 893 897 }, 894 898 -
trunk/src/wp-includes/js/customize-loader.js
r37339 r38520 184 184 */ 185 185 opened: function() { 186 Loader.body.addClass( 'customize-active full-overlay-active' ) ;187 }, 188 189 /** 190 * Close the Customizer overlay and return focus to the link that opened it.186 Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' ); 187 }, 188 189 /** 190 * Close the Customizer overlay. 191 191 */ 192 192 close: function() { … … 209 209 if ( this.originalDocumentTitle ) { 210 210 document.title = this.originalDocumentTitle; 211 }212 213 // Return focus to link that was originally clicked.214 if ( this.link ) {215 this.link.focus();216 211 } 217 212 }, … … 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 … … 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
Note: See TracChangeset
for help on using the changeset viewer.