Skip to content

Commit 3760639

Browse files
committed
Accessibility: Remove inappropriate content from the Widgets screen heading.
See #26601. git-svn-id: https://develop.svn.wordpress.org/trunk@39541 602fd350-edb4-49c9-b593-d223f7449a82
1 parent fd4b770 commit 3760639

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

src/wp-admin/widgets.php

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,24 +344,27 @@
344344
require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
345345

346346
<div class="wrap">
347-
<h1>
347+
<h1 class="wp-heading-inline"><?php
348+
echo esc_html( $title );
349+
?></h1>
350+
348351
<?php
349-
echo esc_html( $title );
350-
if ( current_user_can( 'customize' ) ) {
351-
printf(
352-
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
353-
esc_url( add_query_arg(
354-
array(
355-
array( 'autofocus' => array( 'panel' => 'widgets' ) ),
356-
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )
357-
),
358-
admin_url( 'customize.php' )
359-
) ),
360-
__( 'Manage with Live Preview' )
361-
);
362-
}
352+
if ( current_user_can( 'customize' ) ) {
353+
printf(
354+
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
355+
esc_url( add_query_arg(
356+
array(
357+
array( 'autofocus' => array( 'panel' => 'widgets' ) ),
358+
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )
359+
),
360+
admin_url( 'customize.php' )
361+
) ),
362+
__( 'Manage with Live Preview' )
363+
);
364+
}
363365
?>
364-
</h1>
366+
367+
<hr class="wp-header-end">
365368

366369
<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
367370
<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div>

0 commit comments

Comments
 (0)