diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 6c7272c421dbd7989ff3d058b107582d32ee291f..5304d25c0c184cf180bf69ed8f1faf8c7173ddb7 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1687,15 +1687,16 @@ function theme_image($variables) { */ function theme_breadcrumb($variables) { $breadcrumb = $variables['breadcrumb']; - + $output = ''; if (!empty($breadcrumb)) { + $output .= '<nav role="navigation" class="breadcrumb">'; // Provide a navigational heading to give context for breadcrumb links to // screen-reader users. Make the heading invisible with .element-invisible. - $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>'; - - $output .= '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>'; - return $output; + $output .= '<h2 class="element-invisible">' . t('You are here') . '</h2>'; + $output .= '<ol><li>' . implode(' » </li><li>', $breadcrumb) . '</li></ol>'; + $output .= '</nav>'; } + return $output; } /** diff --git a/core/modules/book/book.test b/core/modules/book/book.test index 6b457428507e177d247a1272ad4a213105cc9dcd..83328e05324104b0b19e18014fbf5ce8760b6be0 100644 --- a/core/modules/book/book.test +++ b/core/modules/book/book.test @@ -156,7 +156,7 @@ class BookTestCase extends DrupalWebTestCase { } // Fetch links in the current breadcrumb. - $links = $this->xpath('//div[@class="breadcrumb"]/a'); + $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { $got_breadcrumb[] = (string) $link['href']; diff --git a/core/modules/node/node.test b/core/modules/node/node.test index a04b0e663002aca77645e12dcfb386ed0344b730..2e9b075d3303feb470b550300f255cd4acd2cc1f 100644 --- a/core/modules/node/node.test +++ b/core/modules/node/node.test @@ -1732,7 +1732,7 @@ class NodeTitleTestCase extends DrupalWebTestCase { // Test breadcrumb in comment preview. $this->drupalGet("comment/reply/$node->nid"); - $xpath = '//div[@class="breadcrumb"]/a[last()]'; + $xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a'; $this->assertEqual(current($this->xpath($xpath)), $node->title, 'Node breadcrumb is equal to node title.', 'Node'); // Test node title in comment preview. diff --git a/core/modules/simpletest/tests/menu.test b/core/modules/simpletest/tests/menu.test index d0612ac77a6beea68a7c968bde0184a4d2d817ff..5a173b146c5666e1e9d390dd57e60261c589b59f 100644 --- a/core/modules/simpletest/tests/menu.test +++ b/core/modules/simpletest/tests/menu.test @@ -107,7 +107,7 @@ class MenuWebTestCase extends DrupalWebTestCase { */ protected function getParts() { $parts = array(); - $elements = $this->xpath('//div[@class="breadcrumb"]/a'); + $elements = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); if (!empty($elements)) { foreach ($elements as $element) { $parts[] = array( diff --git a/core/modules/system/page.tpl.php b/core/modules/system/page.tpl.php index 23b577e8b305c37dd9309f49d1986f915a10a9b9..c76e27f20af368a182947603b2d0b900baac3957 100644 --- a/core/modules/system/page.tpl.php +++ b/core/modules/system/page.tpl.php @@ -107,9 +107,7 @@ </nav> <?php endif; ?> - <?php if ($breadcrumb): ?> - <div id="breadcrumb"><?php print $breadcrumb; ?></div> - <?php endif; ?> + <?php print $breadcrumb; ?> <?php if ($messages): ?> <div id="messages"><?php print $messages; ?></div> diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index 1993d176d743d2b716514652ccb461a52d83cb02..7121813ba88a0a75d9c26dec3c313fbe6fa91b40 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -294,6 +294,16 @@ ul.inline li { .breadcrumb { padding-bottom: 0.5em; } +.breadcrumb ol { + margin: 0; + padding: 0; +} +.breadcrumb li { + display: inline; + list-style-type: none; + margin: 0; + padding: 0; +} /** * Markup generated by theme_menu_local_tasks(). diff --git a/core/themes/bartik/css/layout.css b/core/themes/bartik/css/layout.css index b561f4c021cd83766e290e923a3a87046e80d482..7dfddf77d50590c24c4abae97caffe15e3ec9d3f 100644 --- a/core/themes/bartik/css/layout.css +++ b/core/themes/bartik/css/layout.css @@ -75,7 +75,7 @@ body, .sidebar .section { padding: 0 15px; } -#breadcrumb { +.breadcrumb { margin: 0 15px; } .region-triptych-first, diff --git a/core/themes/bartik/templates/page.tpl.php b/core/themes/bartik/templates/page.tpl.php index 7b0f99097a0e40b2f6944b61584951430b8a94fe..44e9ceae68bffed964e89791b16d6698a50c0daf 100644 --- a/core/themes/bartik/templates/page.tpl.php +++ b/core/themes/bartik/templates/page.tpl.php @@ -172,9 +172,7 @@ <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix"> - <?php if ($breadcrumb): ?> - <div id="breadcrumb"><?php print $breadcrumb; ?></div> - <?php endif; ?> + <?php print $breadcrumb; ?> <?php if ($page['sidebar_first']): ?> <div id="sidebar-first" class="column sidebar"><div class="section">