WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/01/2015 02:51:25 PM (5 years ago)
Author:
afercia
Message:

In wp_comment_reply() change the H5 headings in fieldset legends for better accessibility.

Also, add a "Edit Comment" legend before the Quick Edit form to pair it with "Reply to Comment" and "Add new Comment" and move the Name, Email, and URL fields after the Comment textarea.

Props joedolson, afercia.

Fixes #33757.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template-functions.php

    r34605 r34743  
    381381<div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
    382382<?php endif; ?>
    383     <div id="replyhead" style="display:none;"><h5><?php _e( 'Reply to Comment' ); ?></h5></div>
    384     <div id="addhead" style="display:none;"><h5><?php _e('Add new Comment'); ?></h5></div>
     383    <fieldset class="comment-reply">
     384    <legend>
     385        <span class="hidden" id="editlegend"><?php _e( 'Edit Comment' ); ?></span>
     386        <span class="hidden" id="replyhead"><?php _e( 'Reply to Comment' ); ?></span>
     387        <span class="hidden" id="addhead"><?php _e( 'Add new Comment' ); ?></span>
     388    </legend>
     389
     390    <div id="replycontainer">
     391    <label for="replycontent" class="screen-reader-text"><?php _e( 'Comment' ); ?></label>
     392    <?php
     393    $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
     394    wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
     395    ?>
     396    </div>
     397
    385398    <div id="edithead" style="display:none;">
    386399        <div class="inside">
     
    398411        <input type="text" id="author-url" name="newcomment_author_url" class="code" size="103" value="" />
    399412        </div>
    400         <div style="clear:both;"></div>
    401     </div>
    402 
    403     <div id="replycontainer">
    404     <?php
    405     $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    406     wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
    407     ?>
    408413    </div>
    409414
     
    416421    <span class="waiting spinner"></span>
    417422    <span class="error" style="display:none;"></span>
    418     <br class="clear" />
    419423    </p>
    420424
     
    431435            wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
    432436    ?>
     437    </fieldset>
    433438<?php if ( $table_row ) : ?>
    434439</td></tr></tbody></table>
Note: See TracChangeset for help on using the changeset viewer.