WordPress.org

Make WordPress Core

Ticket #16433: 16433.3.patch

File 16433.3.patch, 1.2 KB (added by joedolson, 5 years ago)

Uses aria-label to provide name of commenter.

  • wp-includes/comment-template.php

     
    13371337        if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
    13381338                $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $args['login_text'] . '</a>';
    13391339        } else {
    1340                 $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
     1340                $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")' aria-label='" . sprintf( __( 'Reply to %s' ), esc_attr( $comment->comment_author ) ) . "'>$reply_text</a>";
    13411341        }
    13421342        /**
    13431343         * Filter the comment reply link.