diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php index 206bf5a..8fcfd9a 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.php @@ -259,7 +259,7 @@ public function testCustomElementTitle() { $view->initDisplay(); $style = $view->display_handler->getOption('style'); - $style['type'] = 'table'; + $style['type'] = $plugin; $style['options']['title_element_type'] = 'h6'; $style['options']['grouping'] = 'name'; $view->display_handler->overrideOption('style', $style); diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 44403dd..22f5052 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -753,7 +753,7 @@ function template_preprocess_views_view_table(&$vars) { $vars['summary'] = $handler->options['summary']; $vars['description'] = $handler->options['description']; - $vars['caption_needed'] |= !empty($vars['summary']) || !empty($vars['description']); + $vars['caption_needed'] |= !empty($vars['summary']) || !empty($vars['description']) || !empty($vars['title']); // If the table has headers and it should react responsively to columns hidden // with the classes represented by the constants RESPONSIVE_PRIORITY_MEDIUM