WordPress.org

Make WordPress Core

Changeset 30327


Ignore:
Timestamp:
11/13/2014 11:59:23 AM (6 years ago)
Author:
ocean90
Message:

Improve keyboard accessibility on Custom Header and Custom Background screen.

props florianziegler.
fixes #29289.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r30186 r30327  
    318318    <p>
    319319        <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
    320         <a id="choose-from-library-link" class="button"
     320        <button id="choose-from-library-link" class="button"
    321321            data-choose="<?php esc_attr_e( 'Choose a Background Image' ); ?>"
    322             data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></a>
     322            data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></button>
    323323    </p>
    324324    </form>
  • trunk/src/wp-admin/custom-header.php

    r30187 r30327  
    558558            $style = ' style="display:none;"';
    559559        ?>
    560         <h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1>
     560        <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>
    561561        <div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
    562562    </div>
     
    605605    <p>
    606606        <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
    607         <a id="choose-from-library-link" class="button"
     607        <button id="choose-from-library-link" class="button"
    608608            data-update-link="<?php echo esc_attr( $modal_update_href ); ?>"
    609609            data-choose="<?php esc_attr_e( 'Choose a Custom Header' ); ?>"
    610             data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></a>
     610            data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></button>
    611611    </p>
    612612    </form>
  • trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php

    r30230 r30327  
    144144?>
    145145    <div id="headimg" style="background-image: url(<?php header_image(); ?>); background-color: <?php echo esc_attr( $header_background_color ); ?>;">
    146         <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>
     146        <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>
    147147        <div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
    148148    </div>
  • trunk/src/wp-content/themes/twentythirteen/inc/custom-header.php

    r28701 r30327  
    221221        <?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?>
    222222        <div class="home-link">
    223             <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#"><?php bloginfo( 'name' ); ?></a></h1>
     223            <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
    224224            <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
    225225        </div>
  • trunk/src/wp-content/themes/twentytwelve/inc/custom-header.php

    r27599 r30327  
    156156            $style = ' style="color:#' . get_header_textcolor() . ';"';
    157157        ?>
    158         <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>
     158        <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>
    159159        <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
    160160        <?php $header_image = get_header_image();
Note: See TracChangeset for help on using the changeset viewer.