From 2b55dfcb8b9c9c6a0b0de74c0ac444cd6fa96101 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date: Mon, 30 Mar 2015 12:49:38 +0000
Subject: [PATCH] Make sure the update button in "At a Glance" dashboard widget
 does not overlap with long strings.

props SergeyBiryukov, afercia, tyxla.
fixes #30766.

git-svn-id: https://develop.svn.wordpress.org/trunk@31928 602fd350-edb4-49c9-b593-d223f7449a82
---
 src/wp-admin/css/dashboard.css   | 2 +-
 src/wp-admin/includes/update.php | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css
index 13194606f9..7c8c480a17 100644
--- a/src/wp-admin/css/dashboard.css
+++ b/src/wp-admin/css/dashboard.css
@@ -352,10 +352,10 @@ body #dashboard-widgets .postbox form .submit {
 }
 
 #dashboard_right_now #wp-version-message .button {
-	clear: right;
 	float: right;
 	position: relative;
 	top: -5px;
+	margin-left: 5px;
 }
 
 .mu-storage {
diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php
index b78fbfeaba..bad56866fe 100644
--- a/src/wp-admin/includes/update.php
+++ b/src/wp-admin/includes/update.php
@@ -221,15 +221,17 @@ function update_right_now_message() {
 		$theme_name = sprintf( '<a href="themes.php">%1$s</a>', $theme_name );
 	}
 
-	$msg = sprintf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name );
+	$msg = '';
 
 	if ( current_user_can('update_core') ) {
 		$cur = get_preferred_from_update_core();
 
 		if ( isset( $cur->response ) && $cur->response == 'upgrade' )
-			$msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
+			$msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
 	}
 
+	$msg .= sprintf( '<span id="wp-version">' . __( 'WordPress %1$s running %2$s theme.' ) . '</span>', get_bloginfo( 'version', 'display' ), $theme_name );
+
 	echo "<p id='wp-version-message'>$msg</p>";
 }