diff --git a/core/includes/form.inc b/core/includes/form.inc
index 0ef70f8..57a0b0b 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -3923,10 +3923,8 @@ function form_pre_render_details($element) {
   }
 
   // Collapsible details.
-  if (!empty($element['#collapsible'])) {
-    $element['#attached']['library'][] = array('system', 'drupal.collapse');
-    $element['#attributes']['class'][] = 'collapsible';
-  }
+  $element['#attached']['library'][] = array('system', 'drupal.collapse');
+  $element['#attributes']['class'][] = 'collapsible';
   if (empty($element['#collapsed'])) {
     $element['#attributes']['open'] = 'open';
   }
diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
index 98a7a96..7928947 100644
--- a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
+++ b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php
@@ -141,6 +141,7 @@ protected function formMultipleElements(EntityInterface $entity, array $items, $
       // The group of elements all-together need some extra functionality after
       // building up the full list (like draggable table rows).
       $elements['#file_upload_delta'] = $delta;
+      $elements['#type'] = 'details';
       $elements['#theme'] = 'file_widget_multiple';
       $elements['#theme_wrappers'] = array('details');
       $elements['#process'] = array('file_field_widget_process_multiple');
