Acessibility: "Add New Category" links on Edit Post screen should not be a header.

Props afercia.
Fixes #33557.

git-svn-id: https://develop.svn.wordpress.org/trunk@35129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-10-13 06:59:34 +00:00
parent 70a4da6f04
commit 4240fe532c
1 changed files with 7 additions and 9 deletions

View File

@ -505,14 +505,12 @@ function post_categories_meta_box( $post, $box ) {
</div> </div>
<?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?> <?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?>
<div id="<?php echo $tax_name; ?>-adder" class="wp-hidden-children"> <div id="<?php echo $tax_name; ?>-adder" class="wp-hidden-children">
<h4> <a id="<?php echo $tax_name; ?>-add-toggle" href="#<?php echo $tax_name; ?>-add" class="hide-if-no-js taxonomy-add-new">
<a id="<?php echo $tax_name; ?>-add-toggle" href="#<?php echo $tax_name; ?>-add" class="hide-if-no-js"> <?php
<?php /* translators: %s: add new taxonomy label */
/* translators: %s: add new taxonomy label */ printf( __( '+ %s' ), $taxonomy->labels->add_new_item );
printf( __( '+ %s' ), $taxonomy->labels->add_new_item ); ?>
?> </a>
</a>
</h4>
<p id="<?php echo $tax_name; ?>-add" class="category-add wp-hidden-child"> <p id="<?php echo $tax_name; ?>-add" class="category-add wp-hidden-child">
<label class="screen-reader-text" for="new<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label> <label class="screen-reader-text" for="new<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label>
<input type="text" name="new<?php echo $tax_name; ?>" id="new<?php echo $tax_name; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $taxonomy->labels->new_item_name ); ?>" aria-required="true"/> <input type="text" name="new<?php echo $tax_name; ?>" id="new<?php echo $tax_name; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $taxonomy->labels->new_item_name ); ?>" aria-required="true"/>
@ -941,7 +939,7 @@ function link_categories_meta_box($link) {
</div> </div>
<div id="category-adder" class="wp-hidden-children"> <div id="category-adder" class="wp-hidden-children">
<h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> <a id="category-add-toggle" href="#category-add" class="taxonomy-add-new"><?php _e( '+ Add New Category' ); ?></a>
<p id="link-category-add" class="wp-hidden-child"> <p id="link-category-add" class="wp-hidden-child">
<label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label>
<input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" />