diff --git a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarHookToolbarTest.php b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarHookToolbarTest.php index d4f85b8b257..5716978d15d 100644 --- a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarHookToolbarTest.php +++ b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarHookToolbarTest.php @@ -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"'); } } diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module index ab7c2ad1f3c..3ccbf0a64d1 100644 --- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module +++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module @@ -31,9 +31,9 @@ function toolbar_test_toolbar() { 'content' => array( '#theme' => 'item_list', '#items' => array( - l(t('link 1'), ''), - l(t('link 2'), ''), - l(t('link 3'), ''), + l(t('link 1'), '', array('attributes' => array('title' => 'Test link 1 title'))), + l(t('link 2'), '', array('attributes' => array('title' => 'Test link 2 title'))), + l(t('link 3'), '', array('attributes' => array('title' => 'Test link 3 title'))), ), '#prefix' => '

' . t('Test tray') . '

', '#attributes' => array( diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 52d398875e5..14135bbde83 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -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']), ); } }