Make WordPress Core

Ticket #21325: list-table-select-all.diff

File list-table-select-all.diff, 5.2 KB (added by MikeLittle, 13 years ago)

Adds labels to select all checkboxes.

  • class-wp-ms-sites-list-table.php

     
    143143        function get_columns() {
    144144                $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
    145145                $sites_columns = array(
    146                         'cb'          => '<input type="checkbox" />',
     146                        'cb'          => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    147147                        'blogname'    => $blogname_columns,
    148148                        'lastupdated' => __( 'Last Updated' ),
    149149                        'registered'  => _x( 'Registered', 'site' ),
  • class-wp-posts-list-table.php

     
    261261
    262262                $posts_columns = array();
    263263
    264                 $posts_columns['cb'] = '<input type="checkbox" />';
     264                $posts_columns['cb'] = '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />';
    265265
    266266                /* translators: manage posts column name */
    267267                $posts_columns['title'] = _x( 'Title', 'column name' );
  • class-wp-media-list-table.php

     
    126126
    127127        function get_columns() {
    128128                $posts_columns = array();
    129                 $posts_columns['cb'] = '<input type="checkbox" />';
     129                $posts_columns['cb'] = '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />';
    130130                $posts_columns['icon'] = '';
    131131                /* translators: column name */
    132132                $posts_columns['title'] = _x( 'File', 'column name' );
  • class-wp-links-list-table.php

     
    7676
    7777        function get_columns() {
    7878                return array(
    79                         'cb'         => '<input type="checkbox" />',
     79                        'cb'             => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    8080                        'name'       => _x( 'Name', 'link name' ),
    8181                        'url'        => __( 'URL' ),
    8282                        'categories' => __( 'Categories' ),
  • class-wp-terms-list-table.php

     
    9696                global $taxonomy, $post_type;
    9797
    9898                $columns = array(
    99                         'cb'          => '<input type="checkbox" />',
     99                        'cb'          => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    100100                        'name'        => _x( 'Name', 'term name' ),
    101101                        'description' => __( 'Description' ),
    102102                        'slug'        => __( 'Slug' ),
  • class-wp-users-list-table.php

     
    159159
    160160        function get_columns() {
    161161                $c = array(
    162                         'cb'       => '<input type="checkbox" />',
     162                        'cb'       => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    163163                        'username' => __( 'Username' ),
    164164                        'name'     => __( 'Name' ),
    165165                        'email'    => __( 'E-mail' ),
  • class-wp-ms-themes-list-table.php

     
    170170                global $status;
    171171
    172172                return array(
    173                         'cb'          => '<input type="checkbox" />',
     173                        'cb'          => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    174174                        'name'        => __( 'Theme' ),
    175175                        'description' => __( 'Description' ),
    176176                );
  • class-wp-ms-users-list-table.php

     
    111111
    112112        function get_columns() {
    113113                $users_columns = array(
    114                         'cb'         => '<input type="checkbox" />',
     114                        'cb'         => '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />',
    115115                        'username'   => __( 'Username' ),
    116116                        'name'       => __( 'Name' ),
    117117                        'email'      => __( 'E-mail' ),
  • class-wp-plugins-list-table.php

     
    175175                global $status;
    176176
    177177                return array(
    178                         'cb'          => !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',
     178                        'cb'          => !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<label class="screen-reader-text" for="cb-cb">' . __('Select all') . '</label><input id="cb-cb" type="checkbox" />' : '',
    179179                        'name'        => __( 'Plugin' ),
    180180                        'description' => __( 'Description' ),
    181181                );