diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js
index e76292e..a3ea1dc 100644
--- a/core/misc/machine-name.js
+++ b/core/misc/machine-name.js
@@ -50,7 +50,7 @@
 
       function clickEditHandler(e) {
         var data = e.data;
-        data.$wrapper.removeClass('visually-hidden');
+        data.$wrapper.removeClass('hidden');
         data.$target.trigger('focus');
         data.$suffix.hide();
         data.$source.off('.machineName');
@@ -109,7 +109,7 @@
         // Figure out the maximum length for the machine name.
         options.maxlength = $target.attr('maxlength');
         // Hide the form item container of the machine name form element.
-        $wrapper.addClass('visually-hidden');
+        $wrapper.addClass('hidden');
         // Determine the initial machine name value. Unless the machine name
         // form element is disabled or not empty, the initial default value is
         // based on the human-readable form element value.
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
index 10aa88e..dcd5d9b 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php
@@ -97,7 +97,7 @@ public function testMachineName() {
 
     // Validate the machine name field is hidden. Elements are visually hidden
     // using positioning, isVisible() will therefore not work.
-    $this->assertEquals(TRUE, $machine_name_1_wrapper->hasClass('visually-hidden'), 'The ID field must not be visible');
+    $this->assertEquals(TRUE, $machine_name_1_wrapper->hasClass('hidden'), 'The ID field must not be visible');
     $this->assertEquals(TRUE, $machine_name_2_wrapper->hasClass('visually-hidden'), 'The ID field must not be visible');
 
     // Test switching back to the manual editing mode by clicking the edit link.
