Make WordPress Core


Ignore:
Timestamp:
06/05/2015 08:39:26 AM (10 years ago)
Author:
obenland
Message:

Remove title attributes in user list tables.

They don't add valuable information and are redundant.
Reduces annoyance for screen reader users.

Props afercia.
Fixes #32535.

File:
1 edited

Legend:

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

    r32670 r32694  
    432432                        break;
    433433                    case 'email':
    434                         $r .= "<a href='mailto:$email' title='" . esc_attr( sprintf( __( 'E-mail: %s' ), $email ) ) . "'>$email</a>";
     434                        $r .= "<a href='mailto:$email'>$email</a>";
    435435                        break;
    436436                    case 'role':
     
    439439                    case 'posts':
    440440                        $attributes = 'class="posts column-posts num"' . $style;
    441                         $r .= "";
    442441                        if ( $numposts > 0 ) {
    443                             $r .= "<a href='edit.php?author=$user_object->ID' title='" . esc_attr__( 'View posts by this author' ) . "' class='edit'>";
    444                             $r .= $numposts;
     442                            $r .= "<a href='edit.php?author=$user_object->ID' class='edit'>";
     443                            $r .= '<span aria-hidden="true">' . $numposts . '</span>';
     444                            $r .= '<span class="screen-reader-text">' . sprintf( _n( '%s post by this author', '%s posts by this author', $numposts ), number_format_i18n( $numposts ) ) . '</span>';
    445445                            $r .= '</a>';
    446446                        } else {
Note: See TracChangeset for help on using the changeset viewer.