Make WordPress Core


Ignore:
Timestamp:
02/04/2016 07:18:21 PM (9 years ago)
Author:
afercia
Message:

Accessibility: simplify the Plugins and Themes tables on the Updates screen.

Although it may seem counterintuitive at first, in very limited cases it's
better to remove improper semantics (this is not a tabular data table) in
order to reduce noise for screen reader users and simplify all the things.
Also improves headings to better separate sections.

Fixes #34780.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r36349 r36477  
    243243<?php wp_nonce_field('upgrade-core'); ?>
    244244<p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p>
    245 <table class="widefat" id="update-plugins-table">
     245<table class="widefat updates-table" id="update-plugins-table">
    246246    <thead>
    247247    <tr>
    248         <td scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all" /></td>
    249         <th scope="col" class="manage-column"><label for="plugins-select-all"><?php _e('Select All'); ?></label></th>
     248        <td class="manage-column check-column"><input type="checkbox" id="plugins-select-all" /></td>
     249        <td class="manage-column"><label for="plugins-select-all"><?php _e( 'Select All' ); ?></label></td>
    250250    </tr>
    251251    </thead>
     
    289289        ?>
    290290        <tr>
    291             <th scope="row" class="check-column">
     291            <td class="check-column">
     292                <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    292293                <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
    293294                    /* translators: %s: plugin name */
     
    296297                    );
    297298                ?></label>
    298                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    299             </th>
    300             <td><p><strong><?php echo $plugin_data->Name; ?></strong><br /><?php
    301                 /* translators: 1: plugin version, 2: new version */
    302                 printf( __( 'You have version %1$s installed. Update to %2$s.' ),
    303                     $plugin_data->Version,
    304                     $plugin_data->update->new_version
    305                 );
    306                 echo ' ' . $details . $compat . $upgrade_notice;
    307             ?></p></td>
     299            </td>
     300            <td class="plugin-title"><p>
     301                <strong><?php echo $plugin_data->Name; ?></strong>
     302                <?php
     303                    /* translators: 1: plugin version, 2: new version */
     304                    printf( __( 'You have version %1$s installed. Update to %2$s.' ),
     305                        $plugin_data->Version,
     306                        $plugin_data->update->new_version
     307                    );
     308                    echo ' ' . $details . $compat . $upgrade_notice;
     309                ?>
     310            </p></td>
    308311        </tr>
    309312        <?php
     
    314317    <tfoot>
    315318    <tr>
    316         <td scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all-2" /></td>
    317         <th scope="col" class="manage-column"><label for="plugins-select-all-2"><?php _e( 'Select All' ); ?></label></th>
     319        <td class="manage-column check-column"><input type="checkbox" id="plugins-select-all-2" /></td>
     320        <td class="manage-column"><label for="plugins-select-all-2"><?php _e( 'Select All' ); ?></label></td>
    318321    </tr>
    319322    </tfoot>
     
    343346<?php wp_nonce_field('upgrade-core'); ?>
    344347<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p>
    345 <table class="widefat" id="update-themes-table">
     348<table class="widefat updates-table" id="update-themes-table">
    346349    <thead>
    347350    <tr>
    348         <td scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all" /></td>
    349         <th scope="col" class="manage-column"><label for="themes-select-all"><?php _e('Select All'); ?></label></th>
     351        <td class="manage-column check-column"><input type="checkbox" id="themes-select-all" /></td>
     352        <td class="manage-column"><label for="themes-select-all"><?php _e( 'Select All' ); ?></label></td>
    350353    </tr>
    351354    </thead>
     
    357360        ?>
    358361        <tr>
    359             <th scope="row" class="check-column">
     362            <td class="check-column">
     363                <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    360364                <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
    361365                    /* translators: %s: theme name */
     
    364368                    );
    365369                ?></label>
    366                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    367             </th>
    368             <td class="plugin-title">
    369                 <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" style="float:left; padding: 0 5px 5px" alt="" />
     370            </td>
     371            <td class="plugin-title"><p>
     372                <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />
    370373                <strong><?php echo $theme->display( 'Name' ); ?></strong>
    371374                <?php
     
    376379                    );
    377380                ?>
    378             </td>
     381            </p></td>
    379382        </tr>
    380383        <?php
     
    385388    <tfoot>
    386389    <tr>
    387         <td scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all-2" /></td>
    388         <th scope="col" class="manage-column"><label for="themes-select-all-2"><?php _e( 'Select All' ); ?></label></th>
     390        <td class="manage-column check-column"><input type="checkbox" id="themes-select-all-2" /></td>
     391        <td class="manage-column"><label for="themes-select-all-2"><?php _e( 'Select All' ); ?></label></td>
    389392    </tr>
    390393    </tfoot>
Note: See TracChangeset for help on using the changeset viewer.