From 0e0a407908e5b479395a08c53cafb362cb5ddc1d Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 27 Jun 2013 10:27:51 +0100 Subject: [PATCH] Issue #1853324 by sandipmkhairnar, kim.pepper, RyanPrice: Fixed Missing link descriptions in responsive toolbar. --- .../lib/Drupal/toolbar/Tests/ToolbarHookToolbarTest.php | 6 ++++++ .../toolbar/tests/modules/toolbar_test/toolbar_test.module | 6 +++--- core/modules/toolbar/toolbar.module | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) 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'), '<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( 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']), ); } }