Themes: Add feedback for screen readers when search results are changed.

props obenland, joedolson.
see #26600.

git-svn-id: https://develop.svn.wordpress.org/trunk@31497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-02-22 10:14:45 +00:00
parent 579c7cd3bf
commit 7f69e6430b
4 changed files with 9 additions and 8 deletions

View File

@ -1137,11 +1137,12 @@ body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {
}
p.no-themes {
clear: both;
color: #999;
font-size: 18px;
font-style: normal;
margin: 0;
padding: 0;
padding: 100px 0 0;
text-align: center;
display: none;
}

View File

@ -79,7 +79,8 @@ themes.view.Appearance = wp.Backbone.View.extend({
// Render and append
this.view.render();
this.$el.empty().append( this.view.el ).addClass('rendered');
this.$el.find( '.themes' ).remove();
this.$el.append( this.view.el ).addClass( 'rendered' );
this.$el.append( '<br class="clear"/>' );
},

View File

@ -166,10 +166,10 @@ include(ABSPATH . 'wp-admin/admin-header.php');
</div>
</div>
</div>
<div class="theme-browser content-filterable"></div>
<div class="theme-browser content-filterable" aria-live="polite">
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
</div>
<div class="theme-install-overlay wp-full-overlay expanded"></div>
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
<span class="spinner"></span>
<br class="clear" />

View File

@ -198,7 +198,7 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
?>
<div class="theme-browser">
<div class="theme-browser" aria-live="polite">
<div class="themes">
<?php
@ -250,11 +250,10 @@ foreach ( $themes as $theme ) :
<?php endforeach; ?>
<br class="clear" />
</div>
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
</div>
<div class="theme-overlay"></div>
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
<?php
// List broken themes, if any.
if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {