diff --git src/wp-includes/widgets/class-wp-widget-recent-comments.php src/wp-includes/widgets/class-wp-widget-recent-comments.php
index 6d89eee..b1aaa93 100644
--- src/wp-includes/widgets/class-wp-widget-recent-comments.php
+++ src/wp-includes/widgets/class-wp-widget-recent-comments.php
@@ -66,12 +66,17 @@ class WP_Widget_Recent_Comments extends WP_Widget {
 	 * Outputs the content for the current Recent Comments widget instance.
 	 *
 	 * @since 2.8.0
+	 * @since 5.3.0 Added $first_recentcomments staticvar.
+	 *
+	 * @staticvar bool $first_dropdown
 	 *
 	 * @param array $args     Display arguments including 'before_title', 'after_title',
 	 *                        'before_widget', and 'after_widget'.
 	 * @param array $instance Settings for the current Recent Comments widget instance.
 	 */
 	public function widget( $args, $instance ) {
+		static $first_recentcomments = true;
+
 		if ( ! isset( $args['widget_id'] ) ) {
 			$args['widget_id'] = $this->id;
 		}
@@ -116,7 +121,10 @@ class WP_Widget_Recent_Comments extends WP_Widget {
 			$output .= $args['before_title'] . $title . $args['after_title'];
 		}
 
-		$output .= '<ul id="recentcomments">';
+		$recentcomments_id    = ( $first_recentcomments ) ? 'recentcomments' : $args['widget_id'];
+		$first_recentcomments = false;
+
+		$output .= '<ul id="' . esc_attr( $recentcomments_id ) . '">';
 		if ( is_array( $comments ) && $comments ) {
 			// Prime cache for associated posts. (Prime post term cache if we need it for permalinks.)
 			$post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
