diff --git a/core/includes/form.inc b/core/includes/form.inc
index 58563c6..952cbd4 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -204,7 +204,13 @@ function template_preprocess_fieldset(&$variables) {
   }
 
   $variables['legend']['attributes'] = new Attribute();
-  $variables['legend_span']['attributes'] = new Attribute();
+  // Add 'visually-hidden' class to legend span.
+  if ($variables['title_display'] == 'invisible') {
+    $variables['legend_span']['attributes'] = new Attribute(array('class' => 'visually-hidden'));
+  }
+  else {
+    $variables['legend_span']['attributes'] = new Attribute();
+  }
 
   if (!empty($element['#description'])) {
     $description_id = $element['#attributes']['id'] . '--description';
diff --git a/core/modules/system/src/Tests/Form/ElementsLabelsTest.php b/core/modules/system/src/Tests/Form/ElementsLabelsTest.php
index 9a09442..bf8d21c 100644
--- a/core/modules/system/src/Tests/Form/ElementsLabelsTest.php
+++ b/core/modules/system/src/Tests/Form/ElementsLabelsTest.php
@@ -93,6 +93,12 @@ function testFormLabels() {
     $this->assertEqual($elements[0]['title'], 'Checkboxes test' . ' (' . t('Required') . ')', 'Title attribute found.');
     $elements = $this->xpath('//div[@id="edit-form-radios-title-attribute"]');
     $this->assertEqual($elements[0]['title'], 'Radios test' . ' (' . t('Required') . ')', 'Title attribute found.');
+
+    $elements = $this->xpath('//fieldset[@id="edit-form-checkboxes-title-invisible--wrapper"]/legend/span[contains(@class, "visually-hidden")]');
+    $this->assertTrue(!empty($elements), "Title/Label not displayed when 'visually-hidden' attribute is set in checkboxes.");
+
+    $elements = $this->xpath('//fieldset[@id="edit-form-radios-title-invisible--wrapper"]/legend/span[contains(@class, "visually-hidden")]');
+    $this->assertTrue(!empty($elements), "Title/Label not displayed when 'visually-hidden' attribute is set in radios.");
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerTest.php b/core/modules/system/src/Tests/Installer/InstallerTest.php
index 5514f75..a2dd968 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTest.php
+++ b/core/modules/system/src/Tests/Installer/InstallerTest.php
@@ -53,6 +53,8 @@ protected function setUpLanguage() {
   protected function setUpProfile() {
     // Assert that the expected title is present.
     $this->assertEqual('Select an installation profile', $this->cssSelect('main h2')[0]);
+    $result = $this->xpath('//span[contains(@class, :class) and contains(text(), :text)]', array(':class' => 'visually-hidden', ':text' => 'Select an installation profile'));
+    $this->assertEqual(count($result), 1, "Title/Label not displayed when '#title_display' => 'invisible' attribute is set");
 
     parent::setUpProfile();
   }
diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestLabelForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestLabelForm.php
index 75234b0..ae57d4e 100644
--- a/core/modules/system/tests/modules/form_test/src/Form/FormTestLabelForm.php
+++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestLabelForm.php
@@ -108,7 +108,26 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       ),
       '#required' => TRUE,
     );
-
+    $form['form_checkboxes_title_invisible'] = array(
+      '#type' => 'checkboxes',
+      '#title' => 'Checkboxes test invisible',
+      '#title_display' => 'invisible',
+      '#options' => array(
+        'first-checkbox' => 'First checkbox',
+        'second-checkbox' => 'Second checkbox',
+      ),
+      '#required' => TRUE,
+    );
+    $form['form_radios_title_invisible'] = array(
+      '#type' => 'radios',
+      '#title' => 'Radios test invisible',
+      '#title_display' => 'invisible',
+      '#options' => array(
+        'first-radio' => 'First radio',
+        'second-radio' => 'Second radio',
+      ),
+      '#required' => TRUE,
+    );
     return $form;
   }
 
