]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/theme.js
WordPress 4.3
[autoinstalls/wordpress.git] / wp-admin / js / theme.js
index 2cf5f770ad9322f019a2d7002eccc8d50f63c45c..0e83f4e04beac38df3a90881d64bd48a632ad32b 100644 (file)
@@ -84,7 +84,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
        },
 
        // Defines search element container
-       searchContainer: $( '#wpbody h2:first' ),
+       searchContainer: $( '#wpbody h1:first' ),
 
        // Search input and view
        // for current theme collection
@@ -793,7 +793,13 @@ themes.view.Preview = themes.view.Details.extend({
                return false;
        },
 
-       collapse: function() {
+       collapse: function( event ) {
+               var $button = $( event.currentTarget );
+               if ( 'true' === $button.attr( 'aria-expanded' ) ) {
+                       $button.attr({ 'aria-expanded': 'false', 'aria-label': l10n.expandSidebar });
+               } else {
+                       $button.attr({ 'aria-expanded': 'true', 'aria-label': l10n.collapseSidebar });
+               }
 
                this.$el.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
                return false;