diff --git a/core/includes/pager.inc b/core/includes/pager.inc index 62e8278ed26..d9fb9f120e9 100644 --- a/core/includes/pager.inc +++ b/core/includes/pager.inc @@ -6,6 +6,7 @@ */ use Drupal\Component\Utility\UrlHelper; +use Drupal\Component\Utility\Html; /** * Returns the current page being requested for display within a pager. @@ -278,6 +279,7 @@ function template_preprocess_pager(&$variables) { } $variables['items'] = $items; + $variables['heading_id'] = Html::getUniqueId('pagination-heading'); // The rendered link needs to play well with any other query parameter used // on the page, like exposed filters, so for the cacheability all query diff --git a/core/modules/system/templates/pager.html.twig b/core/modules/system/templates/pager.html.twig index 50f1e1344ce..affc1e53a35 100644 --- a/core/modules/system/templates/pager.html.twig +++ b/core/modules/system/templates/pager.html.twig @@ -4,6 +4,7 @@ * Default theme implementation to display a pager. * * Available variables: + * - heading_id: Pagination heading ID. * - items: List of pager items. * The list is keyed by the following elements: * - first: Item for the first page; not present on the first page of results. @@ -32,8 +33,8 @@ */ #} {% if items %} -