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.

Built from https://develop.svn.wordpress.org/trunk@38700


git-svn-id: http://core.svn.wordpress.org/trunk@38643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-10-02 14:38:31 +00:00
parent 3c814b5468
commit 5ab4753564
12 changed files with 33 additions and 56 deletions

View File

@ -451,7 +451,7 @@ form#tags-filter {
height: auto !important;
}
#misc-publishing-actions label[for="post_status"]:before,
#post-body .misc-pub-post-status:before,
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
@ -459,20 +459,22 @@ span.wp-media-buttons-icon:before {
color: #82878c;
}
#post-body .misc-pub-post-status:before,
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before {
font: normal 20px/1 dashicons;
speak: none;
display: inline-block;
padding: 0 0 0 2px;
top: 0;
right: -1px;
position: relative;
margin-right: -1px;
padding-left: 3px;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none !important;
}
#post-body .misc-pub-post-status:before {
content: "\f173";
}
#post-body #visibility:before {
@ -481,6 +483,7 @@ span.wp-media-buttons-icon:before {
.curtime #timestamp:before {
content: "\f145";
position: relative;
top: -1px;
}

File diff suppressed because one or more lines are too long

View File

@ -451,7 +451,7 @@ form#tags-filter {
height: auto !important;
}
#misc-publishing-actions label[for="post_status"]:before,
#post-body .misc-pub-post-status:before,
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
@ -459,20 +459,22 @@ span.wp-media-buttons-icon:before {
color: #82878c;
}
#post-body .misc-pub-post-status:before,
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before {
font: normal 20px/1 dashicons;
speak: none;
display: inline-block;
padding: 0 2px 0 0;
top: 0;
left: -1px;
position: relative;
margin-left: -1px;
padding-right: 3px;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none !important;
}
#post-body .misc-pub-post-status:before {
content: "\f173";
}
#post-body #visibility:before {
@ -481,6 +483,7 @@ span.wp-media-buttons-icon:before {
.curtime #timestamp:before {
content: "\f145";
position: relative;
top: -1px;
}

File diff suppressed because one or more lines are too long

View File

@ -458,21 +458,6 @@ fieldset label,
vertical-align: baseline;
}
#misc-publishing-actions label[for="post_status"]:before {
content: "\f173";
display: inline-block;
font: normal 20px/1 dashicons;
speak: none;
right: -1px;
padding: 0 0 0 5px;
position: relative;
top: 0;
text-decoration: none !important;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#pass-strength-result {
background-color: #eee;
border: 1px solid #ddd;

File diff suppressed because one or more lines are too long

View File

@ -458,21 +458,6 @@ fieldset label,
vertical-align: baseline;
}
#misc-publishing-actions label[for="post_status"]:before {
content: "\f173";
display: inline-block;
font: normal 20px/1 dashicons;
speak: none;
left: -1px;
padding: 0 5px 0 0;
position: relative;
top: 0;
text-decoration: none !important;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#pass-strength-result {
background-color: #eee;
border: 1px solid #ddd;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -74,9 +74,9 @@ do_action( 'post_submitbox_minor_actions', $post );
<div id="misc-publishing-actions">
<div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php _e('Status:') ?></label>
<span id="post-status-display">
<?php
<div class="misc-pub-section misc-pub-post-status">
<?php _e( 'Status:' ) ?> <span id="post-status-display"><?php
switch ( $post->post_status ) {
case 'private':
_e('Privately Published');
@ -98,11 +98,12 @@ switch ( $post->post_status ) {
?>
</span>
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
<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>
<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>
<div id="post-status-select" class="hide-if-js">
<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); ?>" />
<select name='post_status' id='post_status'>
<label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ) ?></label>
<select name="post_status" id="post_status">
<?php if ( 'publish' == $post->post_status ) : ?>
<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option>
<?php elseif ( 'private' == $post->post_status ) : ?>
@ -144,7 +145,7 @@ if ( 'private' == $post->post_status ) {
echo esc_html( $visibility_trans ); ?></span>
<?php if ( $can_publish ) { ?>
<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>
<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>
<div id="post-visibility-select" class="hide-if-js">
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
@ -201,7 +202,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
<div class="misc-pub-section curtime misc-pub-curtime">
<span id="timestamp">
<?php printf($stamp, $date); ?></span>
<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>
<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>
<fieldset id="timestampdiv" class="hide-if-js">
<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
<?php touch_time( ( $action === 'edit' ), 1 ); ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38699';
$wp_version = '4.7-alpha-38700';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.