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

Fixes #35664.
Built from https://develop.svn.wordpress.org/trunk@37439


git-svn-id: http://core.svn.wordpress.org/trunk@37405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-05-16 13:02:29 +00:00
parent 8c0c57b9f9
commit 1ae8891261
18 changed files with 129 additions and 222 deletions

View File

@ -71,26 +71,22 @@
/* 2 columns main area */
#col-container,
#col-left,
#col-right {
overflow: hidden;
padding: 0;
margin: 0;
}
#col-left {
float: right;
width: 35%;
}
#col-right {
float: left;
clear: left;
width: 65%;
}
.col-wrap {
padding: 0 7px;
#col-left .col-wrap {
padding: 0 0 0 6px;
}
#col-right .col-wrap {
padding: 0 6px 0 0;
}
/* 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-right: 0;
}
.col-wrap {
/* categories */
#col-left,
#col-right {
float: none;
width: auto;
}
#col-left .col-wrap,
#col-right .col-wrap {
padding: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -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;
}

File diff suppressed because one or more lines are too long

View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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;
}

File diff suppressed because one or more lines are too long

View File

@ -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;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -321,87 +321,21 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
endif; ?>
<div id="ajax-response"></div>
<form class="search-form" method="get">
<form class="search-form wp-clearfix" method="get">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
</form>
<br class="clear" />
<div id="col-container">
<div id="col-right">
<div class="col-wrap">
<form id="posts-filter" method="post">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
<?php $wp_list_table->display(); ?>
<br class="clear" />
</form>
<?php if ( 'category' == $taxonomy ) : ?>
<div class="form-wrap">
<p>
<?php
echo '<strong>' . __( 'Note:' ) . '</strong><br />';
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 */
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
);
?>
</p>
<?php if ( current_user_can( 'import' ) ) : ?>
<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>
<?php endif; ?>
</div>
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
<div class="form-wrap">
<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>
</div>
<?php endif;
/**
* Fires after the taxonomy list table.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy name.
*/
do_action( "after-{$taxonomy}-table", $taxonomy );
?>
</div>
</div><!-- /col-right -->
<div id="col-container" class="wp-clearfix">
<div id="col-left">
<div class="col-wrap">
<?php
if ( !is_null( $tax->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 ) :
?>
<div class="tagcloud">
<h2><?php echo $tax->labels->popular_items; ?></h2>
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
</div>
<?php
endif;
}
if ( current_user_can($tax->cap->edit_terms) ) {
if ( 'category' == $taxonomy ) {
/**
@ -597,11 +531,78 @@ if ( 'category' == $taxonomy ) {
do_action( "{$taxonomy}_add_form", $taxonomy );
?>
</form></div>
<?php } ?>
<?php }
if ( ! is_null( $tax->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 ) :
?>
<div class="tagcloud">
<h2><?php echo $tax->labels->popular_items; ?></h2>
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
</div>
<?php
endif;
}
?>
</div>
</div><!-- /col-left -->
<div id="col-right">
<div class="col-wrap">
<form id="posts-filter" method="post">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
<?php $wp_list_table->display(); ?>
</form>
<?php if ( 'category' == $taxonomy ) : ?>
<div class="form-wrap edit-term-notes">
<p>
<?php
echo '<strong>' . __( 'Note:' ) . '</strong><br />';
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 */
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
);
?>
</p>
<?php if ( current_user_can( 'import' ) ) : ?>
<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>
<?php endif; ?>
</div>
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
<div class="form-wrap edit-term-notes">
<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>
</div>
<?php endif;
/**
* Fires after the taxonomy list table.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy name.
*/
do_action( "after-{$taxonomy}-table", $taxonomy );
?>
</div>
</div><!-- /col-right -->
</div><!-- /col-container -->
</div><!-- /wrap -->

View File

@ -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('<tr class="hidden"></tr>');

View File

@ -1 +1 @@
window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27===a.which?inlineEditTax.revert():void 0}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13===a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);
window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27===a.which?inlineEditTax.revert():void 0}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13===a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".wp-list-table.widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);

View File

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