diff --git a/core/includes/pager.inc b/core/includes/pager.inc index 62e8278..f91a513 100644 --- a/core/includes/pager.inc +++ b/core/includes/pager.inc @@ -6,6 +6,7 @@ */ use Drupal\Component\Utility\UrlHelper; +use Drupal\Core\Template\Attribute; /** * Returns the current page being requested for display within a pager. @@ -248,6 +249,8 @@ function template_preprocess_pager(&$variables) { $items['pages'][$i]['href'] = \Drupal::url($route_name, $route_parameters, $options); if ($i == $pager_current) { $variables['current'] = $i; + $items['pages'][$i]['attributes'] = new Attribute(); + $items['pages'][$i]['attributes']['aria-current'] = 'page'; } } // Add an ellipsis if there are further next pages.