diff --git a/core/lib/Drupal/Core/Render/Element/Checkboxes.php b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
index 3663cd57bb..7c6492cb8c 100644
--- a/core/lib/Drupal/Core/Render/Element/Checkboxes.php
+++ b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
@@ -94,7 +94,7 @@ public static function processCheckboxes(&$element, FormStateInterface $form_sta
    * {@inheritdoc}
    */
   public static function valueCallback(&$element, $input, FormStateInterface $form_state) {
-    if ($input === FALSE) {
+    if ($input === FALSE || ($input === NULL && !empty($element['#default_value']))) {
       $value = [];
       $element += ['#default_value' => []];
       foreach ($element['#default_value'] as $key) {
@@ -115,6 +115,16 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
           unset($input[$key]);
         }
       }
+
+      // Refill the input with the default options that were disabled.
+      if (!empty($element['#default_value'])) {
+        foreach ($element['#default_value'] as $key) {
+          if (isset($element[$key]['#disabled'])) {
+            $input[$key] = $key;
+          }
+        }
+      }
+
       return array_combine($input, $input);
     }
     else {
diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestDisabledElementsForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestDisabledElementsForm.php
index 56e6d2ee0f..d2fd78d441 100644
--- a/core/modules/system/tests/modules/form_test/src/Form/FormTestDisabledElementsForm.php
+++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestDisabledElementsForm.php
@@ -34,7 +34,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       ];
     }
 
-    // Multiple values option elements.
+    // Multiple values option elements, disabled as a whole.
     foreach (['checkboxes', 'select'] as $type) {
       $form[$type . '_multiple'] = [
         '#type' => $type,
@@ -52,6 +52,34 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       ];
     }
 
+    // Multiple values option elements, only single options disabled.
+    $form['checkboxes_single_select'] = [
+      '#type' => 'checkboxes',
+      '#title' => 'checkboxes (multiple)',
+      '#options' => [
+        'test_1' => 'Test 1',
+        'test_2' => 'Test 2',
+      ],
+      '#multiple' => TRUE,
+      '#default_value' => ['test_2' => 'test_2'],
+      'test_1' => [
+        '#disabled' => TRUE,
+      ],
+    ];
+    $form['checkboxes_single_unselect'] = [
+      '#type' => 'checkboxes',
+      '#title' => 'checkboxes (multiple)',
+      '#options' => [
+        'test_1' => 'Test 1',
+        'test_2' => 'Test 2',
+      ],
+      '#multiple' => TRUE,
+      '#default_value' => ['test_2' => 'test_2'],
+      'test_2' => [
+        '#disabled' => TRUE,
+      ],
+    ];
+
     // Single values option elements.
     foreach (['radios', 'select'] as $type) {
       $form[$type . '_single'] = [
diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php
index 87c7632457..e2453920ff 100644
--- a/core/modules/system/tests/src/Functional/Form/FormTest.php
+++ b/core/modules/system/tests/src/Functional/Form/FormTest.php
@@ -621,7 +621,7 @@ public function testDisabledElements() {
     // All the elements should be marked as disabled, including the ones below
     // the disabled container.
     $actual_count = count($disabled_elements);
-    $expected_count = 42;
+    $expected_count = 44;
     $this->assertEqual($actual_count, $expected_count, SafeMarkup::format('Found @actual elements with disabled property (expected @expected).', [
       '@actual' => count($disabled_elements),
       '@expected' => $expected_count,
@@ -656,7 +656,7 @@ public function assertFormValuesDefault($values, $form) {
           $expected_value = $form[$key]['#default_value'];
         }
 
-        if ($key == 'checkboxes_multiple') {
+        if (in_array($key, ['checkboxes_multiple', 'checkboxes_single_select', 'checkboxes_single_unselect'])) {
           // Checkboxes values are not filtered out.
           $values[$key] = array_filter($values[$key]);
         }
