Make WordPress Core


Ignore:
Timestamp:
03/30/2019 03:37:28 PM (7 years ago)
Author:
afercia
Message:

Administration: Display a notice in the Site Health pages when JavaScript is off.

  • displays an error notice when JavaScript is off, consistently with other admin screens that depend on JavaScript
  • keeps the main h1 visible

Minor clean-ups:

  • makes code indentation consistent in site-health.php and site-health-info.php
  • removes a couple of <div class="wp-clearfix"></div> as that's not the intended usage of wp-clearfix (those divs didn't do anything anyways)

Fixes #46717.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-health.php

    r45071 r45076  
    3535require_once( ABSPATH . 'wp-admin/admin-header.php' );
    3636?>
    37 
    3837<div class="health-check-header">
    3938        <div class="health-check-title-section">
     
    4241                </h1>
    4342
    44                 <div class="site-health-progress loading">
     43                <div class="site-health-progress hide-if-no-js loading">
    4544                        <svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
    4645                                <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
     
    5251        </div>
    5352
    54         <nav class="health-check-tabs-wrapper" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
     53        <nav class="health-check-tabs-wrapper hide-if-no-js" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
    5554                <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class="health-check-tab active" aria-current="true">
    5655                        <?php _e( 'Status' ); ?>
     
    6160                </a>
    6261        </nav>
    63 
    64         <div class="wp-clearfix"></div>
    6562</div>
    6663
    67 <div class="health-check-body">
     64<div class="notice notice-error hide-if-js">
     65        <p><?php _e( 'The Site Health check requires JavaScript.' ); ?></p>
     66</div>
     67
     68<div class="health-check-body hide-if-no-js">
    6869        <div class="site-status-all-clear hide">
    6970                <p class="icon">
Note: See TracChangeset for help on using the changeset viewer.