WordPress.org

Make WordPress Core

Changeset 37439


Ignore:
Timestamp:
05/16/2016 01:02:00 PM (4 years ago)
Author:
afercia
Message:

Accessibility: make the tab order match the visual order in the Edit terms screens.

Fixes #35664.

Location:
trunk/src/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r37361 r37439  
    7272/* 2 columns main area */
    7373
    74 #col-container,
    75 #col-left,
    76 #col-right {
    77     overflow: hidden;
    78     padding: 0;
    79     margin: 0;
    80 }
    81 
    8274#col-left {
     75    float: left;
    8376    width: 35%;
    8477}
     
    8679#col-right {
    8780    float: right;
    88     clear: right;
    8981    width: 65%;
    9082}
    9183
    92 .col-wrap {
    93     padding: 0 7px;
     84#col-left .col-wrap {
     85    padding: 0 6px 0 0;
     86}
     87
     88#col-right .col-wrap {
     89    padding: 0 0 0 6px;
    9490}
    9591
     
    33663362-------------------------------------------------------------- */
    33673363
    3368 /* @todo: de-duplication */
    3369 @media only screen and (min-width: 769px) {
    3370     /* categories */
    3371     #col-left {
    3372         width: 35%;
    3373     }
    3374 
    3375     #col-right {
    3376         width: 65%;
    3377     }
    3378 }
    3379 
    3380 @media only screen and (max-width: 860px) {
    3381 
    3382     /* categories */
    3383     #col-left {
    3384         width: 35%;
    3385     }
    3386 
    3387     #col-right {
    3388         width: 65%;
    3389     }
    3390 }
    3391 
    3392 @media only screen and (min-width: 980px) {
    3393 
    3394     /* categories */
    3395     #col-left {
    3396         width: 35%;
    3397     }
    3398 
    3399     #col-right {
    3400         width: 65%;
    3401     }
    3402 }
    3403 
    3404 @media only screen and (max-width: 768px) {
    3405     /* categories */
    3406     #col-left {
    3407         width: 100%;
    3408     }
    3409 
    3410     #col-right {
    3411         width: 100%;
    3412     }
    3413 }
    3414 
    34153364/**
    34163365 * HiDPI Displays
     
    34813430    }
    34823431
    3483     .col-wrap {
     3432    /* categories */
     3433    #col-left,
     3434    #col-right {
     3435        float: none;
     3436        width: auto;
     3437    }
     3438
     3439    #col-left .col-wrap,
     3440    #col-right .col-wrap {
    34843441        padding: 0;
    34853442    }
  • trunk/src/wp-admin/css/edit.css

    r37304 r37439  
    982982}
    983983
    984 .form-wrap p,
    985 .form-wrap label {
    986     font-size: 11px;
    987 }
    988 
    989984.form-wrap label {
    990985    display: block;
    991     padding: 2px;
    992     font-size: 12px;
     986    padding: 2px 0;
    993987}
    994988
     
    10211015
    10221016.form-wrap .form-field {
    1023     margin: 0 0 10px;
    1024     padding: 8px 0;
     1017    margin: 1em 0;
     1018    padding: 0;
    10251019}
    10261020
     
    10381032}
    10391033
     1034.edit-term-notes {
     1035    margin-top: 2em;
     1036}
    10401037
    10411038/*------------------------------------------------------------------------------
  • trunk/src/wp-admin/css/forms.css

    r36619 r37439  
    621621.form-table td,
    622622.form-table th,
    623 .form-table td p,
    624 .form-wrap label {
     623.form-table td p {
    625624    font-size: 14px;
    626625}
  • trunk/src/wp-admin/edit-tags.php

    r36308 r37439  
    322322<div id="ajax-response"></div>
    323323
    324 <form class="search-form" method="get">
     324<form class="search-form wp-clearfix" method="get">
    325325<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    326326<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
     
    329329
    330330</form>
    331 <br class="clear" />
    332 
    333 <div id="col-container">
    334 
    335 <div id="col-right">
    336 <div class="col-wrap">
    337 <form id="posts-filter" method="post">
    338 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    339 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
    340 
    341 <?php $wp_list_table->display(); ?>
    342 
    343 <br class="clear" />
    344 </form>
    345 
    346 <?php if ( 'category' == $taxonomy ) : ?>
    347 <div class="form-wrap">
    348 <p>
    349     <?php
    350     echo '<strong>' . __( 'Note:' ) . '</strong><br />';
    351     printf(
    352         /* translators: %s: default category */
    353         __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
    354         /** This filter is documented in wp-includes/category-template.php */
    355         '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
    356     );
    357     ?>
    358 </p>
    359 <?php if ( current_user_can( 'import' ) ) : ?>
    360 <p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
    361 <?php endif; ?>
    362 </div>
    363 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
    364 <div class="form-wrap">
    365 <p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
    366 </div>
    367 <?php endif;
    368 
    369 /**
    370  * Fires after the taxonomy list table.
    371  *
    372  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
    373  *
    374  * @since 3.0.0
    375  *
    376  * @param string $taxonomy The taxonomy name.
    377  */
    378 do_action( "after-{$taxonomy}-table", $taxonomy );
    379 ?>
    380 
    381 </div>
    382 </div><!-- /col-right -->
     331
     332<div id="col-container" class="wp-clearfix">
    383333
    384334<div id="col-left">
     
    386336
    387337<?php
    388 
    389 if ( !is_null( $tax->labels->popular_items ) ) {
    390     if ( current_user_can( $tax->cap->edit_terms ) )
    391         $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
    392     else
    393         $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
    394 
    395     if ( $tag_cloud ) :
    396     ?>
    397 <div class="tagcloud">
    398 <h2><?php echo $tax->labels->popular_items; ?></h2>
    399 <?php echo $tag_cloud; unset( $tag_cloud ); ?>
    400 </div>
    401 <?php
    402 endif;
    403 }
    404338
    405339if ( current_user_can($tax->cap->edit_terms) ) {
     
    598532?>
    599533</form></div>
    600 <?php } ?>
     534<?php }
     535
     536if ( ! is_null( $tax->labels->popular_items ) ) {
     537    if ( current_user_can( $tax->cap->edit_terms ) ) {
     538        $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
     539    } else {
     540        $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
     541    }
     542
     543    if ( $tag_cloud ) :
     544    ?>
     545<div class="tagcloud">
     546<h2><?php echo $tax->labels->popular_items; ?></h2>
     547<?php echo $tag_cloud; unset( $tag_cloud ); ?>
     548</div>
     549<?php
     550    endif;
     551}
     552
     553?>
    601554
    602555</div>
    603556</div><!-- /col-left -->
     557
     558<div id="col-right">
     559<div class="col-wrap">
     560<form id="posts-filter" method="post">
     561<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
     562<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
     563
     564<?php $wp_list_table->display(); ?>
     565
     566</form>
     567
     568<?php if ( 'category' == $taxonomy ) : ?>
     569<div class="form-wrap edit-term-notes">
     570<p>
     571    <?php
     572    echo '<strong>' . __( 'Note:' ) . '</strong><br />';
     573    printf(
     574        /* translators: %s: default category */
     575        __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
     576        /** This filter is documented in wp-includes/category-template.php */
     577        '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
     578    );
     579    ?>
     580</p>
     581<?php if ( current_user_can( 'import' ) ) : ?>
     582<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
     583<?php endif; ?>
     584</div>
     585<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
     586<div class="form-wrap edit-term-notes">
     587<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
     588</div>
     589<?php endif;
     590
     591/**
     592 * Fires after the taxonomy list table.
     593 *
     594 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     595 *
     596 * @since 3.0.0
     597 *
     598 * @param string $taxonomy The taxonomy name.
     599 */
     600do_action( "after-{$taxonomy}-table", $taxonomy );
     601?>
     602
     603</div>
     604</div><!-- /col-right -->
    604605
    605606</div><!-- /col-container -->
  • trunk/src/wp-admin/js/inline-edit-tax.js

    r36304 r37439  
    5656
    5757        editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
    58         $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
     58        $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length );
    5959
    6060        $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');
Note: See TracChangeset for help on using the changeset viewer.