Skip to content

Commit b29c1d3

Browse files
committed
Remove hash click for the Status tab
1 parent 8117bd1 commit b29c1d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/js/_enqueues/admin/site-health.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jQuery( function( $ ) {
4444
$( '.health-check-accordion' ).on( 'click', '.health-check-accordion-trigger', function() {
4545
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
4646

47-
window.location.hash = $( this ).attr( 'id' );
47+
if ( 'undefined' !== typeof $( this ).attr( 'id' ) ) {
48+
window.location.hash = $( this ).attr( 'id' );
49+
}
4850

4951
if ( isExpanded ) {
5052
$( this ).attr( 'aria-expanded', 'false' );

src/wp-admin/site-health.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301

302302
<script id="tmpl-health-check-issue" type="text/template">
303303
<h4 class="health-check-accordion-heading">
304-
<button id="health-check-section-{{ data.test }}" aria-expanded="false" class="health-check-accordion-trigger" aria-controls="health-check-accordion-block-{{ data.test }}" type="button">
304+
<button aria-expanded="false" class="health-check-accordion-trigger" aria-controls="health-check-accordion-block-{{ data.test }}" type="button">
305305
<span class="title">{{ data.label }}</span>
306306
<# if ( data.badge ) { #>
307307
<span class="badge {{ data.badge.color }}">{{ data.badge.label }}</span>

0 commit comments

Comments
 (0)