diff --git a/core/lib/Drupal/Core/Render/Element/Details.php b/core/lib/Drupal/Core/Render/Element/Details.php
index c45810e..682c22d 100644
--- a/core/lib/Drupal/Core/Render/Element/Details.php
+++ b/core/lib/Drupal/Core/Render/Element/Details.php
@@ -64,6 +64,19 @@ public static function preRenderDetails($element) {
       $element['#attributes']['open'] = 'open';
     }
 
+    // Loop through widgets looking for errors, make sure to enable #open if any are found.
+    $parents = implode('][', $element['#parents']);
+    $children = Element::children($element['#groups'][$parents]);
+    if (!empty($children)) {
+      foreach ($children as $key) {
+        foreach (Element::children($element['#groups'][$parents][$key]['widget']) as $widget) {
+          if ($element['#groups'][$parents][$key]['widget'][$widget]['value']['#errors'] != NULL) {
+            $element['#attributes']['open'] = 'open';
+          }
+        }
+      }
+    }
+
     // Do not render optional details elements if there are no children.
     if (isset($element['#parents'])) {
       $group = implode('][', $element['#parents']);
