From 30774e2a626c6181acf93f6841caae14af00d502 Mon, 12 Dec 2011 10:41:30 +0100
From: Bram Goffings <bramgoffings@gmail.com>
Date: Mon, 12 Dec 2011 10:41:24 +0100
Subject: [PATCH] toolbar template



diff --git a/core/modules/shortcut/shortcut-rtl.css b/core/modules/shortcut/shortcut-rtl.css
index 5dec957..9e0c21d 100644
--- a/core/modules/shortcut/shortcut-rtl.css
+++ b/core/modules/shortcut/shortcut-rtl.css
@@ -1,35 +1,35 @@
 
-div#toolbar a#edit-shortcuts {
+#toolbar #edit-shortcuts {
   position: absolute;
   left: 0;
   top: 0;
   padding: 5px 5px 5px 10px;
 }
-div#toolbar div.toolbar-shortcuts ul {
+#toolbar .toolbar-shortcuts ul {
   float: none;
   margin-right: 5px;
   margin-left: 10em;
 }
-div#toolbar div.toolbar-shortcuts ul li a {
+#toolbar .toolbar-shortcuts ul li a {
   margin-left: 5px;
   margin-right: 0;
   padding: 0 5px;
 }
-div#toolbar div.toolbar-shortcuts span.icon {
+#toolbar .toolbar-shortcuts span.icon {
   float: right;
 }
-div.add-or-remove-shortcuts a span.icon {
+.add-or-remove-shortcuts a span.icon {
   float: right;
   margin-right: 8px;
   margin-left: 0;
 }
-div.add-or-remove-shortcuts a span.text {
+.add-or-remove-shortcuts a span.text {
   float: right;
   padding-right: 10px;
   padding-left: 0;
 }
-div.add-or-remove-shortcuts a:focus span.text,
-div.add-or-remove-shortcuts a:hover span.text {
+.add-or-remove-shortcuts a:focus span.text,
+.add-or-remove-shortcuts a:hover span.text {
   -moz-border-radius: 5px 0 0 5px;
   -webkit-border-top-left-radius: 5px;
   -webkit-border-bottom-left-radius: 5px;
@@ -40,9 +40,9 @@
   padding-right: 17px;
   padding-left: 0;
 }
-div.add-shortcut a:hover span.icon {
+.add-shortcut a:hover span.icon {
   background-position: 0 -24px;
 }
-div.remove-shortcut a:hover span.icon {
+.remove-shortcut a:hover span.icon {
   background-position: -12px -24px;
 }
diff --git a/core/modules/shortcut/shortcut.css b/core/modules/shortcut/shortcut.css
index 3afcb94..91947f2 100644
--- a/core/modules/shortcut/shortcut.css
+++ b/core/modules/shortcut/shortcut.css
@@ -1,17 +1,17 @@
-div#toolbar a#edit-shortcuts {
+#toolbar #edit-shortcuts {
   float: right;
   padding: 5px 10px 5px 5px;
   line-height: 24px;
   color: #fefefe;
 }
-div#toolbar a#edit-shortcuts:focus,
-div#toolbar a#edit-shortcuts:hover,
-div#toolbar a#edit-shortcuts.active {
+#toolbar #edit-shortcuts:focus,
+#toolbar #edit-shortcuts:hover,
+#toolbar #edit-shortcuts.active {
   color: #fff;
   text-decoration: underline;
 }
 
-div#toolbar div.toolbar-shortcuts ul {
+#toolbar .toolbar-shortcuts ul {
   padding: 5px 0 2px 0;
   height: 28px;
   line-height: 24px;
@@ -19,7 +19,7 @@
   margin-left:5px; /* LTR */
 }
 
-div#toolbar div.toolbar-shortcuts ul li a {
+#toolbar .toolbar-shortcuts ul li a {
   padding: 0 5px 0 5px;
   margin-right: 5px; /* LTR */
   -moz-border-radius: 5px;
@@ -27,18 +27,18 @@
   border-radius: 5px;
 }
 
-div#toolbar div.toolbar-shortcuts ul li a:focus,
-div#toolbar div.toolbar-shortcuts ul li a:hover,
-div#toolbar div.toolbar-shortcuts ul li a.active:focus {
+#toolbar .toolbar-shortcuts ul li a:focus,
+#toolbar .toolbar-shortcuts ul li a:hover,
+#toolbar .toolbar-shortcuts ul li a.active:focus {
   background: #555;
 }
 
-div#toolbar div.toolbar-shortcuts ul li a.active:hover,
-div#toolbar div.toolbar-shortcuts ul li a.active {
+#toolbar .toolbar-shortcuts ul li a.active:hover,
+#toolbar .toolbar-shortcuts ul li a.active {
   background: #000;
 }
 
-div#toolbar div.toolbar-shortcuts span.icon {
+#toolbar .toolbar-shortcuts span.icon {
   float: left; /* LTR */
   background: #444;
   width: 30px;
@@ -49,11 +49,11 @@
   border-radius: 5px;
 }
 
-div.add-or-remove-shortcuts {
+.add-or-remove-shortcuts {
   padding-top: 5px;
 }
 
-div.add-or-remove-shortcuts a span.icon {
+.add-or-remove-shortcuts a span.icon {
   display: block;
   width: 12px;
   background: transparent url(shortcut.png) no-repeat scroll 0 0;
@@ -62,26 +62,26 @@
   margin-left:8px;
 }
 
-div.add-shortcut a:focus span.icon,
-div.add-shortcut a:hover span.icon {
+.add-shortcut a:focus span.icon,
+.add-shortcut a:hover span.icon {
   background-position: 0 -12px;
 }
-div.remove-shortcut a span.icon {
+.remove-shortcut a span.icon {
   background-position: -12px 0;
 }
-div.remove-shortcut a:focus span.icon,
-div.remove-shortcut a:hover span.icon {
+.remove-shortcut a:focus span.icon,
+.remove-shortcut a:hover span.icon {
   background-position: -12px -12px;
 }
 
-div.add-or-remove-shortcuts a span.text {
+.add-or-remove-shortcuts a span.text {
   float: left;
   padding-left:10px;
   display: none;
 }
 
-div.add-or-remove-shortcuts a:focus span.text,
-div.add-or-remove-shortcuts a:hover span.text {
+.add-or-remove-shortcuts a:focus span.text,
+.add-or-remove-shortcuts a:hover span.text {
   font-size: 10px;
   line-height: 12px;
   color: #fff;
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index d25ca2d..d174107 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -203,7 +203,7 @@
   $build['toolbar_menu'] = array(
     '#theme' => 'links__toolbar_menu',
     '#links' => $links,
-    '#attributes' => array('id' => 'toolbar-menu'),
+    '#attributes' => array('id' => 'toolbar-menu', 'role' => 'toolbar', 'type' => 'toolbar'),
     '#heading' => array('text' => t('Administrative toolbar'), 'level' => 'h2', 'class' => 'element-invisible'),
   );
 
@@ -233,7 +233,7 @@
   $build['toolbar_user'] = array(
     '#theme' => 'links__toolbar_user',
     '#links' => $links,
-    '#attributes' => array('id' => 'toolbar-user'),
+    '#attributes' => array('id' => 'toolbar-user', 'role' => 'toolbar', 'type' => 'toolbar'),
   );
 
   // Add a "home" link.
@@ -248,7 +248,7 @@
   $build['toolbar_home'] = array(
     '#theme' => 'links',
     '#links' => $link,
-    '#attributes' => array('id' => 'toolbar-home'),
+    '#attributes' => array('id' => 'toolbar-home', 'role' => 'toolbar', 'type' => 'toolbar'),
   );
 
   // Add an anchor to be able to toggle the visibility of the drawer.
diff --git a/core/modules/toolbar/toolbar.tpl.php b/core/modules/toolbar/toolbar.tpl.php
index 342fa60..927fef6 100644
--- a/core/modules/toolbar/toolbar.tpl.php
+++ b/core/modules/toolbar/toolbar.tpl.php
@@ -21,7 +21,7 @@
  * @see template_preprocess_toolbar()
  */
 ?>
-<div id="toolbar" class="<?php print $classes; ?> clearfix">
+<nav id="toolbar" role="menubar" class="<?php print $classes; ?> clearfix">
   <div class="toolbar-menu clearfix">
     <?php print render($toolbar['toolbar_home']); ?>
     <?php print render($toolbar['toolbar_user']); ?>
@@ -32,4 +32,4 @@
   </div>
 
   <?php print render($toolbar['toolbar_drawer']); ?>
-</div>
+</nav>
