Make WordPress Core

Changeset 32945


Ignore:
Timestamp:
06/25/2015 07:30:00 PM (11 years ago)
Author:
wonderboymusic
Message:

After [32796], improve the accessibility and markup for instances of touch_time().

Props rianrietveld, afercia.
Fixes #31714.

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

Legend:

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

    r32805 r32945  
    318318}
    319319
    320 table.media .column-title .media-info p { 
    321         margin-bottom: 0.2em; 
     320table.media .column-title .media-info p {
     321        margin-bottom: 0.2em;
    322322}
    323323
    … …  
    878878}
    879879
     880.inline-edit-row fieldset.inline-edit-date label {
     881        display: inline-block;
     882        margin: 0;
     883        line-height: 1.5;
     884        vertical-align: baseline;
     885}
     886
    880887.inline-edit-row fieldset label.inline-edit-tags {
    881888        margin-top: 0;
    … …  
    887894}
    888895
    889 .inline-edit-row fieldset label span.title {
     896.inline-edit-row fieldset label span.title,
     897.inline-edit-row fieldset.inline-edit-date legend {
    890898        display: block;
    891899        float: left;
    892900        width: 5em;
    893901        line-height: 2.5;
     902}
     903
     904#posts-filter fieldset.inline-edit-date legend {
     905        padding: 0;
     906}
     907
     908.inline-edit-row fieldset.inline-edit-date select {
     909        margin: 1px;
     910        line-height: 28px;
    894911}
    895912
  • trunk/src/wp-admin/edit-form-comment.php

    r32929 r32945  
    9393<span id="timestamp"><?php printf( $stamp, $date ); ?></span>
    9494<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
    95 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
     95<fieldset id='timestampdiv' class='hide-if-js'>
     96<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
     97<?php touch_time( ( 'editcomment' === $action ), 0 ); ?>
     98</fieldset>
    9699</div>
    97100
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r32933 r32945  
    12121212
    12131213        <?php if ( !$bulk ) : ?>
    1214                         <label><span class="title"><?php _e( 'Date' ); ?></span></label>
    1215                         <div class="inline-edit-date">
     1214                        <fieldset class="inline-edit-date">
     1215                        <legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
    12161216                                <?php touch_time( 1, 1, 0, 1 ); ?>
    1217                         </div>
     1217                        </fieldset>
    12181218                        <br class="clear" />
    12191219        <?php endif; // $bulk
  • trunk/src/wp-admin/includes/meta-boxes.php

    r32720 r32945  
    207207        <?php printf($stamp, $date); ?></span>
    208208        <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
    209         <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'), 1); ?></div>
     209        <fieldset id="timestampdiv" class="hide-if-js">
     210        <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
     211        <?php touch_time( ( $action === 'edit' ), 1 ); ?>
     212        </fieldset>
    210213</div><?php // /misc-pub-section ?>
    211214<?php endif; ?>
  • trunk/src/wp-admin/includes/template.php

    r32902 r32945  
    782782        $cur_mn = gmdate( 'i', $time_adj );
    783783
    784         $month = '<label for="mm" class="screen-reader-text">' . __( 'Month' ) . '</label><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
     784        $month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
    785785        for ( $i = 1; $i < 13; $i = $i +1 ) {
    786786                $monthnum = zeroise($i, 2);
    … …  
    789789                $month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
    790790        }
    791         $month .= '</select>';
    792 
    793         $day = '<label for="jj" class="screen-reader-text">' . __( 'Day' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    794         $year = '<label for="aa" class="screen-reader-text">' . __( 'Year' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
    795         $hour = '<label for="hh" class="screen-reader-text">' . __( 'Hour' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    796         $minute = '<label for="mn" class="screen-reader-text">' . __( 'Minute' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     791        $month .= '</select></label>';
     792
     793        $day = '<label><span class="screen-reader-text">' . __( 'Day' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
     794        $year = '<label><span class="screen-reader-text">' . __( 'Year' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" /></label>';
     795        $hour = '<label><span class="screen-reader-text">' . __( 'Hour' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
     796        $minute = '<label><span class="screen-reader-text">' . __( 'Minute' ) . '</span><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" /></label>';
    797797
    798798        echo '<div class="timestamp-wrap">';
Note: See TracChangeset for help on using the changeset viewer.