Skip to content

Commit

Permalink
Merge pull request #352 from mdoggydog/navmenu-title-on-a
Browse files Browse the repository at this point in the history
Move 'title' attribute of NavMenu toggles to the <a> elements
  • Loading branch information
malberts authored Oct 4, 2022
2 parents 8117b02 + ac6a850 commit 285c909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/NavMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ protected function buildDropdownMenuStub( $menuDescription ) {
return $this->indent() . \Html::rawElement( 'div',
[
'class' => 'nav-item ' . $menuId . '-dropdown',
'title' => Linker::titleAttrib( $menuId )
],
\Html::rawElement( 'a',
[
'href' => '#',
'class' => 'nav-link ' . $menuId . '-toggle',
'title' => Linker::titleAttrib( $menuId ),
],
htmlspecialchars( $menuDescription['header'] ) )
);
Expand All @@ -179,7 +179,6 @@ protected function buildDropdownOpeningTags( $menuDescription ) {
$ret = $this->indent() . \Html::openElement( 'div',
[
'class' => 'nav-item dropdown ' . $menuId . '-dropdown',
'title' => Linker::titleAttrib( $menuId ),
] );

// add the dropdown toggle
Expand All @@ -190,6 +189,7 @@ protected function buildDropdownOpeningTags( $menuDescription ) {
'class' => 'nav-link dropdown-toggle ' . $menuId . '-toggle',
'data-toggle' => 'dropdown',
'data-boundary' => 'viewport',
'title' => Linker::titleAttrib( $menuId ),
],
htmlspecialchars( $menuDescription['header'] ) );

Expand Down

0 comments on commit 285c909

Please sign in to comment.