Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/08/2018 09:33:31 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Accessibility: Avoid back-to-back author links.

This change ensures that avatar and display-name links are wrapped in a shared anchor, instead of each with their own.

Includes a few test changes to better suit our intentions of verifying valid & accessible HTML output.

Fixes #3220. Props dcavins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/users/template/user.php

    r6328 r6868  
    711711                // Pretty permalinks
    712712                $this->set_permalink_structure( '/%postname%/' );
    713                 $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name .
    714                         '&#039;s profile" class="bbp-author-avatar">' . $wp_avatar .
    715                         '</a>&nbsp;<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name .
    716                         '&#039;s profile" class="bbp-author-name">' . $display_name . '</a>';
     713                $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . '&#039;s profile" class="bbp-author-link"><span class="bbp-author-avatar">' . $wp_avatar .
     714                        '</span>&nbsp;<span class="bbp-author-name">' . $display_name . '</span></a>';
    717715
    718716                // String.
     
    728726                $this->set_permalink_structure();
    729727                $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name .
    730                         '&#039;s profile" class="bbp-author-avatar">' . $wp_avatar .
    731                         '</a>&nbsp;<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name .
    732                         '&#039;s profile" class="bbp-author-name">' . $display_name . '</a>';
     728                        '&#039;s profile" class="bbp-author-link"><span class="bbp-author-avatar">' . $wp_avatar .
     729                        '</span>&nbsp;<span class="bbp-author-name">' . $display_name . '</span></a>';
    733730
    734731                // String.
Note: See TracChangeset for help on using the changeset viewer.