Accessibility: Remove inappropriate content from the Posts and Edit screens headings.

Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia.

See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@38983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2016-10-27 20:38:09 +00:00
parent 3ffefccdf2
commit cc6925d1d5
5 changed files with 57 additions and 11 deletions

View File

@@ -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 &#8220;%s&#8221;' ) . '</span>', get_search_query() );
}
?></h1>
?>
<hr class="wp-header-end">
<?php
// If we have a bulk message to issue: