Make WordPress Core


Ignore:
Timestamp:
01/26/2016 10:37:41 PM (8 years ago)
Author:
afercia
Message:

Accessibility: Improve the focus style on the Credits screen.

Leads and contributing developers will now look nicer when focused.
Also, combines adjacent image and text links for the same resource thus
simplifying markup and reducing noise for screen reader users.

Props walbo, afercia.
Fixes #34953.

File:
1 edited

Legend:

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

    r36171 r36406  
    8181            foreach ( $group_data['data'] as $person_data ) {
    8282                echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
    83                 echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">';
     83                echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
    8484                $size = 'compact' == $group_data['type'] ? 30 : 60;
    8585                $data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    8686                $size *= 2;
    8787                $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    88                 echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
    89                 echo '<a class="web" href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">' . esc_html( $person_data[0] ) . "</a>\n\t";
     88                echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
     89                echo esc_html( $person_data[0] ) . "</a>\n\t";
    9090                if ( ! $compact )
    9191                    echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
Note: See TracChangeset for help on using the changeset viewer.