diff --git a/includes/menu.inc b/includes/menu.inc
index 1fe5a64..7b64769 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1606,6 +1606,9 @@ function _menu_tree_data(&$links, $parents, $depth) {
  * Implements template_preprocess_HOOK() for theme_menu_tree().
  */
 function template_preprocess_menu_tree(&$variables) {
+  if (isset($variables['tree']['#attributes'])) {
+    $variables['#attributes'] = $variables['tree']['#attributes'];
+  }
   $variables['tree'] = $variables['tree']['#children'];
 }
 
