Index: wp-includes/admin-bar.php
===================================================================
--- wp-includes/admin-bar.php	(revision 32755)
+++ wp-includes/admin-bar.php	(working copy)
@@ -833,6 +833,7 @@
 		'parent' => 'top-secondary',
 		'id'     => 'search',
 		'title'  => $form,
+		'wrapper' => 'div',
 		'meta'   => array(
 			'class'    => 'admin-bar-search',
 			'tabindex' => -1,
Index: wp-includes/class-wp-admin-bar.php
===================================================================
--- wp-includes/class-wp-admin-bar.php	(revision 32755)
+++ wp-includes/class-wp-admin-bar.php	(working copy)
@@ -124,12 +124,13 @@
 		}
 
 		$defaults = array(
-			'id'     => false,
-			'title'  => false,
-			'parent' => false,
-			'href'   => false,
-			'group'  => false,
-			'meta'   => array(),
+			'id'      => false,
+			'title'   => false,
+			'parent'  => false,
+			'href'    => false,
+			'group'   => false,
+			'wrapper' => 'a',
+			'meta'    => array(),
 		);
 
 		// If the node already exists, keep any data that isn't provided.
@@ -503,19 +504,27 @@
 				endif;
 				?>><?php
 			else:
-				?><div class="ab-item ab-empty-item" <?php echo $aria_attributes;
-				if ( ! empty( $node->meta['title'] ) ) :
-					?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
+				if ( $node->wrapper != 'a' ):
+					?><<?php echo esc_html( $node->wrapper ); ?> class="ab-item ab-empty-item" <?php echo $aria_attributes;
+					if ( ! empty( $node->meta['title'] ) ) :
+						?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
+					endif;
+					?>><?php
+				else:
+					?><a href="#wp-admin-bar-<?php esc_attr( $node->id ); ?>" class="ab-item ab-empty-item" <?php echo $aria_attributes;
+					if ( ! empty( $node->meta['title'] ) ) :
+						?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
+					endif;
+					?>><?php
 				endif;
-				?>><?php
 			endif;
 
 			echo $node->title;
 
-			if ( $has_link ) :
+			if ( $node->wrapper != 'a' ) :
+				?></<?php echo esc_html( $node->wrapper ); ?>><?php
+			else:
 				?></a><?php
-			else:
-				?></div><?php
 			endif;
 
 			if ( $is_parent ) :
