Ticket #26602: 26602.3.diff
File 26602.3.diff, 3.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/theme.js
198 198 render: function() { 199 199 var data = this.model.toJSON(); 200 200 // Render themes using the html template 201 this.$el.html( this.html( data ) ).attr( 'tabindex', 0 ); 201 this.$el.html( this.html( data ) ).attr({ 202 tabindex: 0, 203 'aria-describedby' : data.id + '-action ' + data.id + '-name' 204 }); 202 205 203 206 // Renders active theme styles 204 207 this.activeTheme(); -
src/wp-admin/themes.php
191 191 * This PHP is synchronized with the tmpl-theme template below! 192 192 */ 193 193 194 foreach ( $themes as $theme ) : ?> 195 <div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0"> 194 foreach ( $themes as $theme ) : 195 $aria_action = esc_attr( $theme['id'] . '-action' ); 196 $aria_name = esc_attr( $theme['id'] . '-name' ); 197 ?> 198 <div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>"> 196 199 <?php if ( ! empty( $theme['screenshot'][0] ) ) { ?> 197 200 <div class="theme-screenshot"> 198 201 <img src="<?php echo $theme['screenshot'][0]; ?>" alt="" /> … … 200 203 <?php } else { ?> 201 204 <div class="theme-screenshot blank"></div> 202 205 <?php } ?> 203 <span class="more-details" ><?php _e( 'Theme Details' ); ?></span>206 <span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span> 204 207 <div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div> 205 208 206 209 <?php if ( $theme['active'] ) { ?> 207 <h3 class="theme-name" ><span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?></h3>210 <h3 class="theme-name" id="<?php echo $aria_name; ?>"><span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?></h3> 208 211 <?php } else { ?> 209 <h3 class="theme-name" ><?php echo $theme['name']; ?></h3>212 <h3 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h3> 210 213 <?php } ?> 211 214 212 215 <div class="theme-actions"> … … 277 280 <# } else { #> 278 281 <div class="theme-screenshot blank"></div> 279 282 <# } #> 280 <span class="more-details" ><?php _e( 'Theme Details' ); ?></span>283 <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span> 281 284 <div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div> 282 285 283 286 <# if ( data.active ) { #> 284 <h3 class="theme-name" ><span><?php _ex( 'Active:', 'theme' ); ?></span> {{{ data.name }}}</h3>287 <h3 class="theme-name" id="{{ data.id }}-name"><span><?php _ex( 'Active:', 'theme' ); ?></span> {{{ data.name }}}</h3> 285 288 <# } else { #> 286 <h3 class="theme-name" >{{{ data.name }}}</h3>289 <h3 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h3> 287 290 <# } #> 288 291 289 292 <div class="theme-actions">