From a595b2ff5313ca2adadd5ec5228be6a849649746 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Mon, 16 May 2016 13:02:00 +0000 Subject: [PATCH] Accessibility: make the tab order match the visual order in the Edit terms screens. Fixes #35664. git-svn-id: https://develop.svn.wordpress.org/trunk@37439 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/common.css | 75 ++++------------ src/wp-admin/css/edit.css | 15 ++-- src/wp-admin/css/forms.css | 3 +- src/wp-admin/edit-tags.php | 139 +++++++++++++++-------------- src/wp-admin/js/inline-edit-tax.js | 2 +- 5 files changed, 94 insertions(+), 140 deletions(-) diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 2ec8b7d22a..e392d8a7fe 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -71,26 +71,22 @@ /* 2 columns main area */ -#col-container, -#col-left, -#col-right { - overflow: hidden; - padding: 0; - margin: 0; -} - #col-left { + float: left; width: 35%; } #col-right { float: right; - clear: right; width: 65%; } -.col-wrap { - padding: 0 7px; +#col-left .col-wrap { + padding: 0 6px 0 0; +} + +#col-right .col-wrap { + padding: 0 0 0 6px; } /* utility classes */ @@ -3365,53 +3361,6 @@ img { /* =Media Queries -------------------------------------------------------------- */ -/* @todo: de-duplication */ -@media only screen and (min-width: 769px) { - /* categories */ - #col-left { - width: 35%; - } - - #col-right { - width: 65%; - } -} - -@media only screen and (max-width: 860px) { - - /* categories */ - #col-left { - width: 35%; - } - - #col-right { - width: 65%; - } -} - -@media only screen and (min-width: 980px) { - - /* categories */ - #col-left { - width: 35%; - } - - #col-right { - width: 65%; - } -} - -@media only screen and (max-width: 768px) { - /* categories */ - #col-left { - width: 100%; - } - - #col-right { - width: 100%; - } -} - /** * HiDPI Displays */ @@ -3480,7 +3429,15 @@ img { margin-left: 0; } - .col-wrap { + /* categories */ + #col-left, + #col-right { + float: none; + width: auto; + } + + #col-left .col-wrap, + #col-right .col-wrap { padding: 0; } diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 5e5a6d3a51..4da7cb102b 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -981,15 +981,9 @@ ul.categorychecklist li { border-style: solid; } -.form-wrap p, -.form-wrap label { - font-size: 11px; -} - .form-wrap label { display: block; - padding: 2px; - font-size: 12px; + padding: 2px 0; } .form-field input[type="text"], @@ -1020,8 +1014,8 @@ span.description, } .form-wrap .form-field { - margin: 0 0 10px; - padding: 8px 0; + margin: 1em 0; + padding: 0; } .form-wrap .form-field #parent { @@ -1037,6 +1031,9 @@ span.description, margin-top: -10px; } +.edit-term-notes { + margin-top: 2em; +} /*------------------------------------------------------------------------------ 13.0 - Tags diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 73aa0057d3..fc3d8b60d2 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -620,8 +620,7 @@ ul#add-to-blog-users { .form-table, .form-table td, .form-table th, -.form-table td p, -.form-wrap label { +.form-table td p { font-size: 14px; } diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php index b953da683a..2f64a85030 100644 --- a/src/wp-admin/edit-tags.php +++ b/src/wp-admin/edit-tags.php @@ -321,87 +321,21 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { endif; ?>
-
+ search_box( $tax->labels->search_items, 'tag' ); ?>
-
-
- -
-
-
- - - -display(); ?> - -
-
- - -
-

- ' . __( 'Note:' ) . '
'; - printf( - /* translators: %s: default category */ - __( '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.' ), - /** This filter is documented in wp-includes/category-template.php */ - '' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '' - ); - ?> -

- -

category to tag converter.' ), esc_url( $import_link ) ) ?>

- -
- -
-

tag to category converter.' ), esc_url( $import_link ) ) ;?>

-
- - -
-
+
labels->popular_items ) ) { - if ( current_user_can( $tax->cap->edit_terms ) ) - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); - else - $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); - - if ( $tag_cloud ) : - ?> -
-

labels->popular_items; ?>

- -
-cap->edit_terms) ) { if ( 'category' == $taxonomy ) { /** @@ -597,11 +531,78 @@ if ( 'category' == $taxonomy ) { do_action( "{$taxonomy}_add_form", $taxonomy ); ?>
- +labels->popular_items ) ) { + if ( current_user_can( $tax->cap->edit_terms ) ) { + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); + } else { + $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); + } + + if ( $tag_cloud ) : + ?> +
+

labels->popular_items; ?>

+ +
+
+
+
+
+ + + +display(); ?> + +
+ + +
+

+ ' . __( 'Note:' ) . '
'; + printf( + /* translators: %s: default category */ + __( '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.' ), + /** This filter is documented in wp-includes/category-template.php */ + '' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '' + ); + ?> +

+ +

category to tag converter.' ), esc_url( $import_link ) ) ?>

+ +
+ +
+

tag to category converter.' ), esc_url( $import_link ) ) ;?>

+
+ + +
+
+
diff --git a/src/wp-admin/js/inline-edit-tax.js b/src/wp-admin/js/inline-edit-tax.js index 17095afe9c..3bbf4fb72e 100644 --- a/src/wp-admin/js/inline-edit-tax.js +++ b/src/wp-admin/js/inline-edit-tax.js @@ -55,7 +55,7 @@ inlineEditTax = { } editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); - $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); + $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length ); $(t.what+id).hide().after(editRow).after('');