Fix value of attribute aria-current in LinkPager

This commit is contained in:
Anton 2021-11-26 19:11:00 +03:00 committed by GitHub
parent c7748707ea
commit 7cb500ac75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,13 +285,13 @@ class LinkPager extends Widget
{ {
$options = $this->linkContainerOptions; $options = $this->linkContainerOptions;
$linkWrapTag = ArrayHelper::remove($options, 'tag', 'li'); $linkWrapTag = ArrayHelper::remove($options, 'tag', 'li');
Html::addCssClass($options, empty($class) ? $this->pageCssClass : $class); Html::addCssClass($options, $class ?: $this->pageCssClass);
$linkOptions = $this->linkOptions; $linkOptions = $this->linkOptions;
$linkOptions['data-page'] = $page; $linkOptions['data-page'] = $page;
if ($active) { if ($active) {
$options['aria'] = ['current' => 'true']; $options['aria'] = ['current' => 'page'];
Html::addCssClass($options, $this->activePageCssClass); Html::addCssClass($options, $this->activePageCssClass);
} }
if ($disabled) { if ($disabled) {