diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index d8f31367f56763408c148916c966c31c89b5a6a3..7c766ab96b888a00ddfa65ad2ecfb504a21bf843 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1774,7 +1774,7 @@ function drupal_common_theme() {
       'variables' => array('status' => MARK_NEW),
     ),
     'item_list' => array(
-      'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL),
+      'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL, 'context' => array()),
     ),
     'feed_icon' => array(
       'variables' => array('url' => NULL, 'title' => NULL),
diff --git a/core/modules/search/src/Controller/SearchController.php b/core/modules/search/src/Controller/SearchController.php
index f51466a921e2cee8d3218b76d5e1cbae9bc4d4a2..b7b9a8f97a92a62ac4f7453f59e1f55392f92377 100644
--- a/core/modules/search/src/Controller/SearchController.php
+++ b/core/modules/search/src/Controller/SearchController.php
@@ -117,15 +117,12 @@ public function view(Request $request, SearchPageInterface $entity) {
         '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>',
       ),
       '#list_type' => 'ol',
-      '#attributes' => array(
-        'class' => array(
-          'search-results',
-          $plugin->getPluginId() . '-results',
-        ),
-      ),
       '#cache' => array(
         'tags' => $entity->getCacheTags(),
       ),
+      '#context' => array(
+        'plugin' => $plugin->getPluginId(),
+      ),
     );
 
     // If this plugin uses a search index, then also add the cache tag tracking
diff --git a/core/themes/classy/templates/dataset/item-list--search-results.html.twig b/core/themes/classy/templates/dataset/item-list--search-results.html.twig
new file mode 100644
index 0000000000000000000000000000000000000000..e9928fd776600c762b9f096370e9978ff1c6495a
--- /dev/null
+++ b/core/themes/classy/templates/dataset/item-list--search-results.html.twig
@@ -0,0 +1,29 @@
+{% extends "item-list.html.twig" %}
+{#
+/**
+ * @file
+ * Theme override for an item list of search results.
+ *
+ * Available variables:
+ * - items: A list of items. Each item contains:
+ *   - attributes: HTML attributes to be applied to each list item.
+ *   - value: The content of the list element.
+ * - title: The title of the list.
+ * - list_type: The tag for list element ("ul" or "ol").
+ * - attributes: HTML attributes to be applied to the list.
+ * - empty: A message to display when there are no items. Allowed value is a
+ *   string or render array.
+ * - context: An list of contextual data associated with the list. For search
+ *   results, the following data is set:
+ *   - plugin: The search plugin ID, for example "node_search".
+ *
+ * @see template_preprocess_item_list()
+ */
+#}
+{%
+  set classes = [
+    'search-results',
+    context.plugin ~ '-results',
+  ]
+%}
+{% set attributes = attributes.addClass(classes) %}