Accessibility: Improve form labels and descriptions for the Tags meta box in the Edit Post screen.

Fixes #34627.
Built from https://develop.svn.wordpress.org/trunk@35609


git-svn-id: http://core.svn.wordpress.org/trunk@35573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2015-11-11 15:24:29 +00:00
parent 025074bbda
commit 62e236b3c6
2 changed files with 7 additions and 6 deletions

View File

@ -435,15 +435,16 @@ function post_tags_meta_box( $post, $box ) {
<div class="tagsdiv" id="<?php echo $tax_name; ?>"> <div class="tagsdiv" id="<?php echo $tax_name; ?>">
<div class="jaxtag"> <div class="jaxtag">
<div class="nojs-tags hide-if-js"> <div class="nojs-tags hide-if-js">
<p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> <label for="tax-input-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_or_remove_items; ?></label>
<textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?>><?php echo str_replace( ',', $comma . ' ', $terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></div> <p><textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?> aria-describedby="new-tag-<?php echo $tax_name; ?>-desc"><?php echo str_replace( ',', $comma . ' ', $terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></p>
</div>
<?php if ( $user_can_assign_terms ) : ?> <?php if ( $user_can_assign_terms ) : ?>
<div class="ajaxtag hide-if-no-js"> <div class="ajaxtag hide-if-no-js">
<label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label>
<p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
<input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p> <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p>
</div> </div>
<p class="howto"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p> <p class="howto" id="new-tag-<?php echo $tax_name; ?>-desc"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="tagchecklist"></div> <div class="tagchecklist"></div>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-beta3-35608'; $wp_version = '4.4-beta3-35609';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.