Accessibility: Remove inappropriate content from the Posts and Edit screens headings.
Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia. See #26601. Built from https://develop.svn.wordpress.org/trunk@38983 git-svn-id: http://core.svn.wordpress.org/trunk@38926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a37a04d0f
commit
7a60d6571c
|
@ -572,10 +572,20 @@ code {
|
|||
font-size: 23px;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
padding: 9px 0 4px 15px;
|
||||
padding: 9px 0 4px 0;
|
||||
line-height: 29px;
|
||||
}
|
||||
|
||||
.wrap h1.wp-heading-inline {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.wp-header-end {
|
||||
visibility: hidden;
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin: 0;
|
||||
padding-right: 25px;
|
||||
|
@ -608,6 +618,10 @@ code {
|
|||
outline: 0;
|
||||
}
|
||||
|
||||
.wrap .wp-heading-inline + .page-title-action {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.wrap .add-new-h2:hover, /* deprecated */
|
||||
.wrap .page-title-action:hover {
|
||||
border-color: #008EC2;
|
||||
|
@ -3654,6 +3668,10 @@ img {
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
.wrap h1.wp-heading-inline {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.wrap .add-new-h2, /* deprecated */
|
||||
.wrap .add-new-h2:active, /* deprecated */
|
||||
.wrap .page-title-action,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -572,10 +572,20 @@ code {
|
|||
font-size: 23px;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
padding: 9px 15px 4px 0;
|
||||
padding: 9px 0 4px 0;
|
||||
line-height: 29px;
|
||||
}
|
||||
|
||||
.wrap h1.wp-heading-inline {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.wp-header-end {
|
||||
visibility: hidden;
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin: 0;
|
||||
padding-left: 25px;
|
||||
|
@ -608,6 +618,10 @@ code {
|
|||
outline: 0;
|
||||
}
|
||||
|
||||
.wrap .wp-heading-inline + .page-title-action {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.wrap .add-new-h2:hover, /* deprecated */
|
||||
.wrap .page-title-action:hover {
|
||||
border-color: #008EC2;
|
||||
|
@ -3654,6 +3668,10 @@ img {
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
.wrap h1.wp-heading-inline {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.wrap .add-new-h2, /* deprecated */
|
||||
.wrap .add-new-h2:active, /* deprecated */
|
||||
.wrap .page-title-action,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -474,11 +474,18 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h1><?php
|
||||
<h1 class="wp-heading-inline"><?php
|
||||
echo esc_html( $title );
|
||||
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
|
||||
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) {
|
||||
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
<hr class="wp-header-end">
|
||||
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -303,16 +303,22 @@ $bulk_counts = array_filter( $bulk_counts );
|
|||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php
|
||||
<h1 class="wp-heading-inline"><?php
|
||||
echo esc_html( $post_type_object->labels->name );
|
||||
if ( current_user_can( $post_type_object->cap->create_posts ) )
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
if ( current_user_can( $post_type_object->cap->create_posts ) ) {
|
||||
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
||||
}
|
||||
|
||||
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
||||
/* translators: %s: search keywords */
|
||||
printf( ' <span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() );
|
||||
}
|
||||
?></h1>
|
||||
?>
|
||||
|
||||
<hr class="wp-header-end">
|
||||
|
||||
<?php
|
||||
// If we have a bulk message to issue:
|
||||
|
|
|
@ -202,7 +202,8 @@ $document.ready( function() {
|
|||
wpwrap: $wpwrap.height(),
|
||||
adminbar: $adminbar.height(),
|
||||
menu: $adminMenuWrap.height()
|
||||
};
|
||||
},
|
||||
$headerEnd = $( '.wp-header-end' );
|
||||
|
||||
|
||||
// when the menu is folded, make the fly-out submenu header clickable
|
||||
|
@ -396,8 +397,13 @@ $document.ready( function() {
|
|||
/*
|
||||
* The `.below-h2` class is here just for backward compatibility with plugins
|
||||
* that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570.
|
||||
* If '.wp-header-end' is found, append the notices after it otherwise
|
||||
* after the first h1 or h2 heading found within the main content.
|
||||
*/
|
||||
$( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() );
|
||||
if ( ! $headerEnd.length ) {
|
||||
$headerEnd = $( '.wrap h1, .wrap h2' ).first();
|
||||
}
|
||||
$( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $headerEnd );
|
||||
|
||||
// Make notices dismissible
|
||||
function makeNoticesDismissible() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -315,7 +315,8 @@ window.autosave = function() {
|
|||
var content, post_title, excerpt, $notice,
|
||||
postData = getSavedPostData(),
|
||||
cookie = wpCookies.get( 'wp-saving-post' ),
|
||||
$newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' );
|
||||
$newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' ),
|
||||
$headerEnd = $( '.wp-header-end' );
|
||||
|
||||
if ( cookie === post_id + '-saved' ) {
|
||||
wpCookies.remove( 'wp-saving-post' );
|
||||
|
@ -338,8 +339,16 @@ window.autosave = function() {
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If '.wp-header-end' is found, append the notices after it otherwise
|
||||
* after the first h1 or h2 heading found within the main content.
|
||||
*/
|
||||
if ( ! $headerEnd.length ) {
|
||||
$headerEnd = $( '.wrap h1, .wrap h2' ).first();
|
||||
}
|
||||
|
||||
$notice = $( '#local-storage-notice' )
|
||||
.insertAfter( $( '.wrap h1, .wrap h2' ).first() )
|
||||
.insertAfter( $headerEnd )
|
||||
.addClass( 'notice-warning' );
|
||||
|
||||
if ( $newerAutosaveNotice.length ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38982';
|
||||
$wp_version = '4.7-alpha-38983';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue