Translate default text of NavBar::$screenReaderToggleText
This commit is contained in:
parent
db6208a2d7
commit
e88c5ebd96
@ -90,7 +90,7 @@ class NavBar extends Widget
|
|||||||
/**
|
/**
|
||||||
* @var string text to show for screen readers for the button to toggle the navbar.
|
* @var string text to show for screen readers for the button to toggle the navbar.
|
||||||
*/
|
*/
|
||||||
public $screenReaderToggleText = 'Toggle navigation';
|
public $screenReaderToggleText;
|
||||||
/**
|
/**
|
||||||
* @var string the toggle button content. Defaults to bootstrap 5 default `<span class="navbar-toggler-icon"></span>`
|
* @var string the toggle button content. Defaults to bootstrap 5 default `<span class="navbar-toggler-icon"></span>`
|
||||||
*/
|
*/
|
||||||
@ -229,7 +229,7 @@ class NavBar extends Widget
|
|||||||
'aria' => [
|
'aria' => [
|
||||||
'controls' => $aria,
|
'controls' => $aria,
|
||||||
'expanded' => 'false',
|
'expanded' => 'false',
|
||||||
'label' => $this->screenReaderToggleText,
|
'label' => $this->screenReaderToggleText ?: Yii::t('yii/bootstrap5', 'Toggle navigation'),
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user