Make WordPress Core


Ignore:
Timestamp:
10/02/2016 02:37:54 PM (8 years ago)
Author:
afercia
Message:

Accessibility: Editor, Publish meta box: remove a stray label and redundant CSS.

Also, adds a role="button" attribute to the "Edit" links.

Props iseulde.
Fixes #28411.

File:
1 edited

Legend:

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

    r38698 r38700  
    7575<div id="misc-publishing-actions">
    7676
    77 <div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php _e('Status:') ?></label>
    78 <span id="post-status-display">
    79 <?php
     77<div class="misc-pub-section misc-pub-post-status">
     78<?php _e( 'Status:' ) ?> <span id="post-status-display"><?php
     79
    8080switch ( $post->post_status ) {
    8181    case 'private':
     
    9999</span>
    100100<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
    101 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
     101<a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
    102102
    103103<div id="post-status-select" class="hide-if-js">
    104104<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" />
    105 <select name='post_status' id='post_status'>
     105<label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ) ?></label>
     106<select name="post_status" id="post_status">
    106107<?php if ( 'publish' == $post->post_status ) : ?>
    107108<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option>
     
    145146echo esc_html( $visibility_trans ); ?></span>
    146147<?php if ( $can_publish ) { ?>
    147 <a href="#visibility" class="edit-visibility hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
     148<a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
    148149
    149150<div id="post-visibility-select" class="hide-if-js">
     
    202203    <span id="timestamp">
    203204    <?php printf($stamp, $date); ?></span>
    204     <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>
     205    <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
    205206    <fieldset id="timestampdiv" class="hide-if-js">
    206207    <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
Note: See TracChangeset for help on using the changeset viewer.