Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
cfe46a2c
Commit
cfe46a2c
authored
Jun 12, 2016
by
tino415
Committed by
Alexander Makarov
Jun 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #137: Remove `role="navbar"` from `yii\bootstrap\NavBar` according to new aria specification
parent
61ff1444
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
NavBar.php
NavBar.php
+0
-3
NavBarTest.php
tests/NavBarTest.php
+34
-0
No files found.
CHANGELOG.md
View file @
cfe46a2c
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -6,6 +6,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Bug #126:
`yii\bootstrap\ToggleButtonGroup`
was unable to work without model (makroxyz)
-
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 #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
2.
0.6 March 17, 2016
--------------------
--------------------
...
...
NavBar.php
View file @
cfe46a2c
...
@@ -100,9 +100,6 @@ class NavBar extends Widget
...
@@ -100,9 +100,6 @@ class NavBar extends Widget
}
else
{
}
else
{
Html
::
addCssClass
(
$this
->
options
,
[
'widget'
=>
'navbar'
]);
Html
::
addCssClass
(
$this
->
options
,
[
'widget'
=>
'navbar'
]);
}
}
if
(
empty
(
$this
->
options
[
'role'
]))
{
$this
->
options
[
'role'
]
=
'navigation'
;
}
$options
=
$this
->
options
;
$options
=
$this
->
options
;
$tag
=
ArrayHelper
::
remove
(
$options
,
'tag'
,
'nav'
);
$tag
=
ArrayHelper
::
remove
(
$options
,
'tag'
,
'nav'
);
echo
Html
::
beginTag
(
$tag
,
$options
);
echo
Html
::
beginTag
(
$tag
,
$options
);
...
...
tests/NavBarTest.php
0 → 100644
View file @
cfe46a2c
<?php
namespace
yiiunit\extensions\bootstrap
;
use
yii\bootstrap\NavBar
;
/**
* Tests for NavBar widget
*
* @group bootstrap
*/
class
NavBarTest
extends
TestCase
{
public
function
testRender
()
{
NavBar
::
$counter
=
0
;
$out
=
NavBar
::
widget
([
'brandLabel'
=>
'My Company'
,
'brandUrl'
=>
'/'
,
'options'
=>
[
'class'
=>
'navbar-inverse navbar-static-top navbar-frontend'
,
],
]);
$expected
=
<<<EXPECTED
<nav id="w0" class="navbar-inverse navbar-static-top navbar-frontend navbar"><div class="container"><div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w0-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span></button><a class="navbar-brand" href="/">My Company</a></div><div id="w0-collapse" class="collapse navbar-collapse"></div></div></nav>
EXPECTED;
$this
->
assertEqualsWithoutLE
(
$expected
,
$out
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment