diff --git a/core/includes/common.inc b/core/includes/common.inc
index da65525..2e653ef 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3052,7 +3052,7 @@ function drupal_render_page($page) {
  *     @code
  *     array(
  *       '#theme' => 'image',
- *       '#attributes' => array('class' => 'foo'),
+ *       '#attributes' => array('class' => array('foo')),
  *       '#theme_wrappers' => array('container'),
  *     );
  *     @endcode
@@ -3061,10 +3061,10 @@ function drupal_render_page($page) {
  *     @code
  *     array(
  *       '#theme' => 'image',
- *       '#attributes' => array('class' => 'foo'),
+ *       '#attributes' => array('class' => array('foo')),
  *       '#theme_wrappers' => array(
  *         'container' => array(
- *           '#attributes' => array('class' => 'bar'),
+ *           '#attributes' => array('class' => array('bar')),
  *         ),
  *       ),
  *     );
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index d676bb5..824be6d 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1572,7 +1572,7 @@ function template_preprocess_file_link(&$variables) {
     '#uri' => file_icon_url($file_entity, $icon_directory),
     '#alt' => (!empty($mime_name[$file->getMimeType()])) ? $mime_name[$file->getMimeType()] : t('File'),
     '#title' => String::checkPlain($file_entity->getFilename()),
-    '#attributes' => array('class' => 'file-icon'),
+    '#attributes' => array('class' => array('file-icon')),
   );
 
   // Set options as per anchor format described at
diff --git a/core/modules/system/src/Tests/Common/RenderElementTypesTest.php b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
index 83a9cdf..8d53fe4 100644
--- a/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
+++ b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
@@ -66,7 +66,7 @@ function testContainer() {
       '#type' => 'container',
       '#markup' => 'foo',
       '#attributes' => array(
-        'class' => 'bar',
+        'class' => array('bar'),
       ),
     ), '<div class="bar">foo</div>' . "\n", "#type 'container' with a class HTML attribute");
 
diff --git a/core/modules/system/src/Tests/Common/RenderTest.php b/core/modules/system/src/Tests/Common/RenderTest.php
index e673208..8ca6acc 100644
--- a/core/modules/system/src/Tests/Common/RenderTest.php
+++ b/core/modules/system/src/Tests/Common/RenderTest.php
@@ -85,7 +85,7 @@ function testDrupalRenderBasics() {
           '#foo' => 'foo',
           '#bar' => 'bar',
           '#theme_wrappers' => array('container'),
-          '#attributes' => array('class' => 'baz'),
+          '#attributes' => array('class' => array('baz')),
         ),
         'expected' => '<div class="baz">foobar</div>' . "\n",
       ),
@@ -98,7 +98,7 @@ function testDrupalRenderBasics() {
           '#type' => 'link',
           '#theme_wrappers' => array(
             'container' => array(
-              '#attributes' => array('class' => 'baz'),
+              '#attributes' => array('class' => array('baz')),
             ),
           ),
           '#attributes' => array('id' => 'foo'),
@@ -117,7 +117,7 @@ function testDrupalRenderBasics() {
           '#title' => 'foo',
           '#theme_wrappers' => array(
             'container' => array(
-              '#attributes' => array('class' => 'baz'),
+              '#attributes' => array('class' => array('baz')),
             ),
           ),
         ),
@@ -128,10 +128,10 @@ function testDrupalRenderBasics() {
       array(
         'name' => 'Two #theme_wrappers container hooks with different attributes',
         'value' => array(
-          '#attributes' => array('class' => 'foo'),
+          '#attributes' => array('class' => array('foo')),
           '#theme_wrappers' => array(
             'container' => array(
-              '#attributes' => array('class' => 'bar'),
+              '#attributes' => array('class' => array('bar')),
             ),
             'container',
           ),
@@ -143,7 +143,7 @@ function testDrupalRenderBasics() {
         'name' => '#theme_wrappers implements an array style theme hook suggestion',
         'value' => array(
           '#theme_wrappers' => array(array('container')),
-          '#attributes' => array('class' => 'foo'),
+          '#attributes' => array('class' => array('foo')),
         ),
         'expected' => '<div class="foo"></div>' . "\n",
       ),
diff --git a/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php b/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
index cf58fff..6a098c5 100644
--- a/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
+++ b/core/modules/tour/tests/tour_test/src/Controller/TourTestController.php
@@ -48,7 +48,7 @@ public function tourTest1($locale = 'foo') {
       'tip-5' => array(
         '#type' => 'container',
         '#attributes' => array(
-          'class' => 'tour-test-5',
+          'class' => array('tour-test-5'),
         ),
         '#children' => t('Tip created later?'),
       ),
diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module
index 910e4be..f27d515 100644
--- a/core/modules/views_ui/views_ui.module
+++ b/core/modules/views_ui/views_ui.module
@@ -151,7 +151,7 @@ function views_ui_preprocess_views_view(&$variables) {
           '#section' => $section,
           '#content' => $variables[$section],
           '#theme_wrappers' => array('views_ui_container'),
-          '#attributes' => array('class' => 'contextual-region'),
+          '#attributes' => array('class' => array('contextual-region')),
         );
       }
     }
