diff --git a/CHANGELOG.md b/CHANGELOG.md index 45747d7..9a01be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Yii Framework 2 bootstrap5 extension Change Log ----------------------- - Enh #18: Add rangeInput(), colorInput() and switch mode to checkbox() in class ActiveField (WinterSilence) +- Bug #19: Fix value of attribute "aria-current" in LinkPager::renderPageButton() (WinterSilence) 2.0.2 October 21, 2021 diff --git a/src/LinkPager.php b/src/LinkPager.php index 6195622..f5e9ba5 100644 --- a/src/LinkPager.php +++ b/src/LinkPager.php @@ -285,13 +285,13 @@ class LinkPager extends Widget { $options = $this->linkContainerOptions; $linkWrapTag = ArrayHelper::remove($options, 'tag', 'li'); - Html::addCssClass($options, empty($class) ? $this->pageCssClass : $class); + Html::addCssClass($options, $class ?: $this->pageCssClass); $linkOptions = $this->linkOptions; $linkOptions['data-page'] = $page; if ($active) { - $options['aria'] = ['current' => 'true']; + $options['aria'] = ['current' => 'page']; Html::addCssClass($options, $this->activePageCssClass); } if ($disabled) { diff --git a/tests/LinkPagerTest.php b/tests/LinkPagerTest.php index 1c87772..3c5f00e 100644 --- a/tests/LinkPagerTest.php +++ b/tests/LinkPagerTest.php @@ -70,12 +70,12 @@ class LinkPagerTest extends TestCase 'pagination' => $pagination, 'disableCurrentPageButton' => false, ]); - $this->assertContains('