Make WordPress Core

Changeset 35983


Ignore:
Timestamp:
12/16/2015 11:36:28 PM (9 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r35901 r35983  
    593593 */
    594594function post_trackback_meta_box($post) {
    595     $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="'. esc_attr( str_replace("\n", ' ', $post->to_ping) ) .'" />';
     595    $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="' .
     596        esc_attr( str_replace( "\n", ' ', $post->to_ping ) ) . '" aria-describedby="trackback-url-desc" />';
    596597    if ('' != $post->pinged) {
    597598        $pings = '<p>'. __('Already pinged:') . '</p><ul>';
     
    604605
    605606?>
    606 <p><label for="trackback_url"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>
     607<p>
     608    <label for="trackback_url"><?php _e( 'Send trackbacks to:' ); ?></label>
     609    <?php echo $form_trackback; ?>
     610</p>
     611<p id="trackback-url-desc" class="howto"><?php _e( 'Separate multiple URLs with spaces' ); ?></p>
    607612<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>
    608613<?php
Note: See TracChangeset for help on using the changeset viewer.