diff --git a/core/modules/user/src/Tests/UserPictureTest.php b/core/modules/user/src/Tests/UserPictureTest.php
index 4f046ab..d6cc52d 100644
--- a/core/modules/user/src/Tests/UserPictureTest.php
+++ b/core/modules/user/src/Tests/UserPictureTest.php
@@ -100,6 +100,7 @@ function testPictureOnNodeComment() {
     // Verify that the image is displayed on the user account page.
     $this->drupalGet('node/' . $node->id());
     $this->assertRaw(file_uri_target($file->getFileUri()), 'User picture found on node page.');
+    $this->assertRaw(t('Profile picture for user @username', ['@username' => $this->webUser->getUsername()]));
 
     // Enable user pictures on comments, instead of nodes.
     $this->config('system.theme.global')
@@ -112,6 +113,7 @@ function testPictureOnNodeComment() {
     );
     $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit, t('Save'));
     $this->assertRaw(file_uri_target($file->getFileUri()), 'User picture found on comment.');
+    $this->assertRaw(t('Profile picture for user @username', ['@username' => $this->webUser->getUsername()]));
 
     // Disable user pictures on comments and nodes.
     $this->config('system.theme.global')
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 5f990ca..a8a083c 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -378,6 +378,23 @@ function user_user_view(array &$build, UserInterface $account, EntityViewDisplay
 }
 
 /**
+ * Implements hook_ENTITY_TYPE_view_alter() for user entities.
+ *
+ * This function adds a default alt tag to the user_picture field to maintain
+ * accessibility.
+ */
+function user_user_view_alter(array &$build, UserInterface $account, EntityViewDisplayInterface $display) {
+  if (user_picture_enabled() && !empty($build['user_picture'])) {
+    foreach (Element::children($build['user_picture']) as $key) {
+      $item = $build['user_picture'][$key]['#item'];
+      if (!$item->get('alt')->getValue()) {
+        $item->get('alt')->setValue(\Drupal::translation()->translate('Profile picture for user @username', ['@username' => $account->getUsername()]));
+      }
+    }
+  }
+}
+
+/**
  * Implements hook_preprocess_HOOK() for block templates.
  */
 function user_preprocess_block(&$variables) {
