diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e8601..e451e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log - Bug #126: `yii\bootstrap\ToggleButtonGroup` was unable to work without model (makroxyz) - Bug #130: Fixed `yii\bootstrap\Collapse` to use pure numerical value on `content` property (meysampg) +- Bug #137: Remove `role="navbar"` from `yii\bootstrap\NavBar` according to new aria specification (tino415) 2.0.6 March 17, 2016 -------------------- diff --git a/NavBar.php b/NavBar.php index e9feda5..fa7a807 100644 --- a/NavBar.php +++ b/NavBar.php @@ -100,9 +100,6 @@ class NavBar extends Widget } else { Html::addCssClass($this->options, ['widget' => 'navbar']); } - if (empty($this->options['role'])) { - $this->options['role'] = 'navigation'; - } $options = $this->options; $tag = ArrayHelper::remove($options, 'tag', 'nav'); echo Html::beginTag($tag, $options); diff --git a/tests/NavBarTest.php b/tests/NavBarTest.php new file mode 100644 index 0000000..3734a63 --- /dev/null +++ b/tests/NavBarTest.php @@ -0,0 +1,34 @@ + 'My Company', + 'brandUrl' => '/', + 'options' => [ + 'class' => 'navbar-inverse navbar-static-top navbar-frontend', + ], + ]); + + $expected = <<
+EXPECTED; + + $this->assertEqualsWithoutLE($expected, $out); + } +}