Issue #1853324 by sandipmkhairnar, kim.pepper, RyanPrice: Fixed Missing link descriptions in responsive toolbar.
parent
7d267ffc43
commit
0e0a407908
core/modules/toolbar
lib/Drupal/toolbar/Tests
tests/modules/toolbar_test
|
@ -50,8 +50,14 @@ class ToolbarHookToolbarTest extends WebTestBase {
|
|||
// Assert that the tab registered by toolbar_test is present.
|
||||
$this->assertRaw('id="toolbar-tab-testing"');
|
||||
|
||||
// Assert that the tab item descriptions are present.
|
||||
$this->assertRaw('title="Test tab"');
|
||||
|
||||
// Assert that the tray registered by toolbar_test is present.
|
||||
$this->assertRaw('id="toolbar-tray-testing"');
|
||||
|
||||
// Assert that tray item descriptions are present.
|
||||
$this->assertRaw('title="Test link 1 title"');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ function toolbar_test_toolbar() {
|
|||
'content' => array(
|
||||
'#theme' => 'item_list',
|
||||
'#items' => array(
|
||||
l(t('link 1'), '<front>'),
|
||||
l(t('link 2'), '<front>'),
|
||||
l(t('link 3'), '<front>'),
|
||||
l(t('link 1'), '<front>', array('attributes' => array('title' => 'Test link 1 title'))),
|
||||
l(t('link 2'), '<front>', array('attributes' => array('title' => 'Test link 2 title'))),
|
||||
l(t('link 3'), '<front>', array('attributes' => array('title' => 'Test link 3 title'))),
|
||||
),
|
||||
'#prefix' => '<h2 class="visually-hidden">' . t('Test tray') . '</h2>',
|
||||
'#attributes' => array(
|
||||
|
|
|
@ -515,6 +515,7 @@ function toolbar_menu_navigation_links(&$tree) {
|
|||
'icon',
|
||||
'icon-' . strtolower(str_replace(' ', '-', $item['link']['link_title'])),
|
||||
),
|
||||
'title' => check_plain($item['link']['description']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue