Improve keyboard accessibility on Custom Header and Custom Background screen.

props florianziegler.
fixes #29289.
Built from https://develop.svn.wordpress.org/trunk@30327


git-svn-id: http://core.svn.wordpress.org/trunk@30326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-11-13 12:00:57 +00:00
parent e0c9ba2d63
commit 120cb5e6ef
6 changed files with 11 additions and 11 deletions

View File

@ -317,9 +317,9 @@ class Custom_Background {
</p> </p>
<p> <p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br /> <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
<a id="choose-from-library-link" class="button" <button id="choose-from-library-link" class="button"
data-choose="<?php esc_attr_e( 'Choose a Background Image' ); ?>" data-choose="<?php esc_attr_e( 'Choose a Background Image' ); ?>"
data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></a> data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></button>
</p> </p>
</form> </form>
</td> </td>

View File

@ -557,7 +557,7 @@ class Custom_Image_Header {
else else
$style = ' style="display:none;"'; $style = ' style="display:none;"';
?> ?>
<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1> <h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> <div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
</div> </div>
<?php } ?> <?php } ?>
@ -604,10 +604,10 @@ class Custom_Image_Header {
?> ?>
<p> <p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br /> <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
<a id="choose-from-library-link" class="button" <button id="choose-from-library-link" class="button"
data-update-link="<?php echo esc_attr( $modal_update_href ); ?>" data-update-link="<?php echo esc_attr( $modal_update_href ); ?>"
data-choose="<?php esc_attr_e( 'Choose a Custom Header' ); ?>" data-choose="<?php esc_attr_e( 'Choose a Custom Header' ); ?>"
data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></a> data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></button>
</p> </p>
</form> </form>
</td> </td>

View File

@ -143,7 +143,7 @@ function twentyfifteen_admin_header_image() {
$header_background_color = get_theme_mod( 'header_background_color', $color_scheme[1] ); $header_background_color = get_theme_mod( 'header_background_color', $color_scheme[1] );
?> ?>
<div id="headimg" style="background-image: url(<?php header_image(); ?>); background-color: <?php echo esc_attr( $header_background_color ); ?>;"> <div id="headimg" style="background-image: url(<?php header_image(); ?>); background-color: <?php echo esc_attr( $header_background_color ); ?>;">
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> <div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
</div> </div>
<?php <?php

View File

@ -220,7 +220,7 @@ function twentythirteen_admin_header_image() {
<div id="headimg" style="background: url(<?php header_image(); ?>) no-repeat scroll top; background-size: 1600px auto;"> <div id="headimg" style="background: url(<?php header_image(); ?>) no-repeat scroll top; background-size: 1600px auto;">
<?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?> <?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?>
<div class="home-link"> <div class="home-link">
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#"><?php bloginfo( 'name' ); ?></a></h1> <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2> <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
</div> </div>
</div> </div>

View File

@ -155,7 +155,7 @@ function twentytwelve_admin_header_image() {
else else
$style = ' style="color:#' . get_header_textcolor() . ';"'; $style = ' style="color:#' . get_header_textcolor() . ';"';
?> ?>
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2> <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
<?php $header_image = get_header_image(); <?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?> if ( ! empty( $header_image ) ) : ?>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.1-alpha-30326'; $wp_version = '4.1-alpha-30327';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.