diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index c9e2681220..aba7d9b946 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -198,7 +198,10 @@ themes.view.Theme = wp.Backbone.View.extend({ render: function() { var data = this.model.toJSON(); // Render themes using the html template - this.$el.html( this.html( data ) ).attr( 'tabindex', 0 ); + this.$el.html( this.html( data ) ).attr({ + tabindex: 0, + 'aria-describedby' : data.id + '-action ' + data.id + '-name' + }); // Renders active theme styles this.activeTheme(); diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index 3493261041..448931d125 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -191,8 +191,11 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) * This PHP is synchronized with the tmpl-theme template below! */ -foreach ( $themes as $theme ) : ?> -
+foreach ( $themes as $theme ) : + $aria_action = esc_attr( $theme['id'] . '-action' ); + $aria_name = esc_attr( $theme['id'] . '-name' ); + ?> +
@@ -200,13 +203,13 @@ foreach ( $themes as $theme ) : ?>
- +
-

+

-

+

@@ -277,13 +280,13 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_ <# } else { #>
<# } #> - +
<# if ( data.active ) { #> -

{{{ data.name }}}

+

{{{ data.name }}}

<# } else { #> -

{{{ data.name }}}

+

{{{ data.name }}}

<# } #>