Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#23178 closed defect (bug) (fixed)

Screen reader shortcut links generated by _render() from WP_Admin_Bar class should use rel="nofolow"

Reported by: Marko-M Owned by: nacin
Priority: normal Milestone: 3.5.2
Component: Toolbar Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Screen reader related links generated by _render() from WP_Admin_Bar class assume toolbar is being shown only to logged in users. When toolbar is being shown to visitors using

function my_set_current_user() {
    if(!is_user_logged_in()){
        add_filter('show_admin_bar', '__return_true');
    }
}
add_action('set_current_user', 'my_set_current_user');

search engines report 403 error code on every page of the website when trying to follow wp_logout_url() from one of these links (Logout link). Including rel="nofollow" into _render() should avoid this.

Attachments (2)

class-wp-admin-bar.php.diff​ (1.0 KB ) - added by Marko-M 14 years ago.
23178.patch​ (502 bytes ) - added by SergeyBiryukov 14 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Marko-M
14 years ago

  • Type enhancement → defect (bug)

#2 @SergeyBiryukov
14 years ago

#23859 was marked as a duplicate.

#3 @nacin
14 years ago

  • Milestone Awaiting Review → 3.5.2

We should instead avoid rendering such a link entirely when the user isn't logged in.

#4 @SergeyBiryukov
14 years ago

  • Keywords has-patch added

#5 @nacin
13 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 24442:

Don't render the screen reader shortcut 'Log Out' link in the toolbar when the user is not logged in.

props SergeyBiryukov.
fixes #23178.

#6 @nacin
13 years ago

In 24443:

Don't render the screen reader shortcut 'Log Out' link in the toolbar when the user is not logged in.

Merges [24442] to the 3.5 branch.

props SergeyBiryukov.
fixes #23178.

Note: See TracTickets for help on using tickets.