Make WordPress Core

Changeset 34743


Ignore:
Timestamp:
10/01/2015 02:51:25 PM (10 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.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/edit.css

    r34670 r34743  
    2525
    2626#save-action .spinner,
    27 #show-comments a,
     27#show-comments a {
     28    float: left;
     29}
     30
    2831#show-comments .spinner {
    29     float: left;
     32    float: none;
     33    margin-top: 0;
    3034}
    3135
     
    248252    float: none;
    249253    margin: 0;
    250     padding: 0 7px 5px;
     254    padding: 5px 7px 10px;
     255    overflow: hidden;
    251256}
    252257
  • trunk/src/wp-admin/css/list-tables.css

    r34710 r34743  
    153153#replysubmit {
    154154    margin: 0;
    155     padding: 0 5px 3px;
     155    padding: 5px 7px 10px;
     156    overflow: hidden;
    156157    text-align: center;
    157158}
     
    167168}
    168169
    169 #replyrow h5 {
    170     margin: .2em 0 0;
    171     padding: 0 5px;
    172     line-height: 1.4em;
    173     font-size: 1em;
     170#replyrow.inline-edit-row fieldset.comment-reply {
     171    font-size: inherit;
     172    line-height: inherit;
     173}
     174
     175#replyrow legend {
     176    margin: 0;
     177    padding: .2em 5px 0;
     178    font-size: 13px;
     179    line-height: 1.4;
     180    font-weight: 600;
     181}
     182
     183#replyrow.inline-edit-row label {
     184    display: inline;
     185    vertical-align: baseline;
     186    line-height: inherit;
    174187}
    175188
     
    434447
    435448#commentsdiv #edithead .inside input {
    436     vertical-align: middle;
    437449    width: 160px;
    438450}
  • 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>
  • trunk/src/wp-admin/js/edit-comments.js

    r34527 r34743  
    677677            $('#status', editRow).val( $('div.comment_status', rowData).text() );
    678678            $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
    679             $('#edithead, #savebtn', editRow).show();
     679            $( '#edithead, #editlegend, #savebtn', editRow ).show();
    680680            $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide();
    681681
     
    692692        } else if ( action == 'add' ) {
    693693            $('#addhead, #addbtn', editRow).show();
    694             $('#replyhead, #replybtn, #edithead, #savebtn', editRow).hide();
     694            $( '#replyhead, #replybtn, #edithead, #editlegend, #savebtn', editRow ) .hide();
    695695            $('#the-comment-list').prepend(editRow);
    696696            $('#replyrow').fadeIn(300);
    697697        } else {
    698698            replyButton = $('#replybtn', editRow);
    699             $('#edithead, #savebtn, #addhead, #addbtn', editRow).hide();
     699            $( '#edithead, #editlegend, #savebtn, #addhead, #addbtn', editRow ).hide();
    700700            $('#replyhead, #replybtn', editRow).show();
    701701            c.after(editRow);
Note: See TracChangeset for help on using the changeset viewer.