diff --git a/core/modules/media_library/src/Form/AddFormBase.php b/core/modules/media_library/src/Form/AddFormBase.php index 4c1e14ff90..e27babaa02 100644 --- a/core/modules/media_library/src/Form/AddFormBase.php +++ b/core/modules/media_library/src/Form/AddFormBase.php @@ -422,8 +422,11 @@ protected function buildSelectedItemElement(MediaInterface $media, array $form, '#title' => $this->t('Select @name', ['@name' => $media->label()]), '#title_display' => 'invisible', '#return_value' => $media->id(), - // Force disable the checkbox. It should only be enabled via - // JavaScript. + // The checkbox’s value is never processed by this form. It is present + // for usability and accessibility reasons, and only used by + // JavaScript to track whether or not this media item is selected. The + // hidden ‘current_selection’ field is used to store the actual IDs of + // selected media items. '#value' => FALSE, ], ],