Issue by sandipmkhairnar, kim.pepper, RyanPrice: Fixed Missing link descriptions in responsive toolbar.

8.0.x
Alex Pott 2013-06-27 10:27:51 +01:00
parent 7d267ffc43
commit 0e0a407908
3 changed files with 10 additions and 3 deletions
core/modules/toolbar
lib/Drupal/toolbar/Tests
tests/modules/toolbar_test

View File

@ -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"');
}
}

View File

@ -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(

View File

@ -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']),
);
}
}