Accessibility: Improvements for the "Send Trackbacks" postbox.

Adds an `aria-describedby` attribute targeting the input field description and styles the description as a... description.

Fixes #35123.
Built from https://develop.svn.wordpress.org/trunk@35983


git-svn-id: http://core.svn.wordpress.org/trunk@35948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2015-12-16 23:37:26 +00:00
parent d5a9811f02
commit 2cc4ca6875
2 changed files with 8 additions and 3 deletions

View File

@ -592,7 +592,8 @@ function post_excerpt_meta_box($post) {
* @param object $post
*/
function post_trackback_meta_box($post) {
$form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="'. esc_attr( str_replace("\n", ' ', $post->to_ping) ) .'" />';
$form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="' .
esc_attr( str_replace( "\n", ' ', $post->to_ping ) ) . '" aria-describedby="trackback-url-desc" />';
if ('' != $post->pinged) {
$pings = '<p>'. __('Already pinged:') . '</p><ul>';
$already_pinged = explode("\n", trim($post->pinged));
@ -603,7 +604,11 @@ function post_trackback_meta_box($post) {
}
?>
<p><label for="trackback_url"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>
<p>
<label for="trackback_url"><?php _e( 'Send trackbacks to:' ); ?></label>
<?php echo $form_trackback; ?>
</p>
<p id="trackback-url-desc" class="howto"><?php _e( 'Separate multiple URLs with spaces' ); ?></p>
<p><?php _e('Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. If you link other WordPress sites, they&#8217;ll be notified automatically using <a href="https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">pingbacks</a>, no other action necessary.'); ?></p>
<?php
if ( ! empty($pings) )

View File

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