From 7cb500ac751e3f30b013ff1dc6994db64874fe26 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 26 Nov 2021 19:11:00 +0300 Subject: [PATCH 1/4] Fix value of attribute aria-current in LinkPager --- src/LinkPager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { From 1d533e0d77d34917228e244e381e6441420565b1 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 26 Nov 2021 19:13:30 +0300 Subject: [PATCH 2/4] Update LinkPagerTest.php --- tests/LinkPagerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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('
  • 6
  • ', $output); + $this->assertContains('
  • 6
  • ', $output); $output = LinkPager::widget([ 'pagination' => $pagination, 'disableCurrentPageButton' => true, ]); - $this->assertContains('
  • 6
  • ', $output); + $this->assertContains('
  • 6
  • ', $output); } public function testOptionsWithTagOption() @@ -105,7 +105,7 @@ class LinkPagerTest extends TestCase $output ); $this->assertContains( - '', + '', $output ); } From 8598b15814da5cc1dffe0d059f2c1df1c8f19a53 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 30 Nov 2021 02:34:16 +0300 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45747d7..56e4624 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 class LinkPager (WinterSilence) 2.0.2 October 21, 2021 From 3c263c257f48160e909605a2ddad0a887f7781ff Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 30 Nov 2021 02:37:19 +0300 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e4624..9a01be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +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 class LinkPager (WinterSilence) +- Bug #19: Fix value of attribute "aria-current" in LinkPager::renderPageButton() (WinterSilence) 2.0.2 October 21, 2021