Make WordPress Core


Ignore:
Timestamp:
07/24/2012 06:01:22 PM (12 years ago)
Author:
ryan
Message:

Add screen reader text to checkboxes in list tables. Props MikeLittle, nacin. see #21325

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-terms-list-table.php

    r19712 r21317  
    237237
    238238        if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
    239             return '<input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" />';
    240         else
    241             return '&nbsp;';
     239            return '<label for="cb-select-' . $tag->term_id . '" class="screen-reader-text">' . sprintf( __( 'Select %s' ), $tag->name )
     240                . '</label><input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" id="cb-select-' . $tag->term_id . '" />';
     241
     242        return '&nbsp;';
    242243    }
    243244
Note: See TracChangeset for help on using the changeset viewer.