diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2692d6bed1d07a985f267b9987aea0363cbda6c3..43b96e1e08eba4906a44607a9314f6e482f27423 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -9,7 +9,6 @@ */ use Drupal\Component\Render\FormattableMarkup; -use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Crypt; @@ -1837,7 +1836,7 @@ function template_preprocess_pager(&$variables) { $items['pages'][$i]['attributes'] = new Attribute(); if ($i == $pager_current) { $variables['current'] = $i; - $items['pages'][$i]['attributes']->setAttribute('aria-current', new TranslatableMarkup('Current page')); + $items['pages'][$i]['attributes']->setAttribute('aria-current', 'page'); } } // Add an ellipsis if there are further next pages. diff --git a/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php b/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php index 4623ffc9c7d44838ab7aa65026c661b8d4d064be..cf210b4ec8aa3df7de0c05061eaf0e0c9dbfd97c 100644 --- a/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php +++ b/core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php @@ -88,7 +88,7 @@ public function testQuantitySet() { /** @var \Drupal\Core\Template\AttributeString $attribute */ $attribute = $variables['items']['pages']['2']['attributes']->offsetGet('aria-current'); $this->assertInstanceOf(AttributeString::class, $attribute); - $this->assertEquals('Current page', $attribute->value()); + $this->assertEquals('page', $attribute->value()); } }