Loading core/includes/theme.inc +1 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -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()); } } Loading
core/includes/theme.inc +1 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading
core/modules/system/tests/src/Unit/Pager/PreprocessPagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -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()); } }