Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/15/2016 10:09:43 PM (8 years ago)
Author:
mercime
Message:

Improve markup of the BuddyPress Tools screen.

Make the screen accessible:

  • remove an extra fieldset
  • remove table markup from fieldset
  • improve legibility of long text for desktop

Fixes #7219.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-tools.php

    r10828 r11014  
    2222        <h1><?php esc_html_e( 'BuddyPress Tools', 'buddypress' ) ?></h1>
    2323
    24         <p>
    25             <?php esc_html_e( 'BuddyPress keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?>
    26             <?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', 'buddypress' ); ?>
     24        <p><?php esc_html_e( 'BuddyPress keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?></p>
     25        <p><?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', 'buddypress' ); ?>
    2726        </p>
    2827        <p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than one repair job at a time.', 'buddypress' ); ?></p>
    2928
    3029        <form class="settings" method="post" action="">
    31             <table class="form-table">
    32                 <tbody>
    33                     <tr valign="top">
    34                         <th scope="row"><?php esc_html_e( 'Repair tools', 'buddypress' ) ?></th>
    35                         <td>
    36                             <fieldset>
    37                                 <legend class="screen-reader-text"><span><?php
    38                                     /* translators: accessibility text */
    39                                     esc_html_e( 'Repair', 'buddypress' );
    40                                 ?></span></legend>
    41 
    42                                 <?php foreach ( bp_admin_repair_list() as $item ) : ?>
    43 
    44                                     <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"><input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?></label><br />
    45 
    46                                 <?php endforeach; ?>
    47 
    48                             </fieldset>
    49                         </td>
    50                     </tr>
    51                 </tbody>
    52             </table>
    53 
    54             <fieldset class="submit">
    55                 <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', 'buddypress' ); ?>" />
    56                 <?php wp_nonce_field( 'bp-do-counts' ); ?>
     30
     31            <fieldset>
     32                <legend><?php esc_html_e( 'Repair tools', 'buddypress' ) ?></legend>
     33
     34                <div class="checkbox">
     35                <?php foreach ( bp_admin_repair_list() as $item ) : ?>
     36                    <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"><input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?></label>
     37                <?php endforeach; ?>
     38                </div>
     39
     40                <p class="submit">
     41                    <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', 'buddypress' ); ?>" />
     42                    <?php wp_nonce_field( 'bp-do-counts' ); ?>
     43                </p>
     44
    5745            </fieldset>
     46
    5847        </form>
     48
    5949    </div>
     50
    6051    <?php
    6152}
Note: See TracChangeset for help on using the changeset viewer.