From 891a7743dd2a96d22158fc6f5fc06ffa8c3b9079 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Mon, 30 Sep 2024 19:10:22 +0000 Subject: [PATCH] Login and Registration: Add descriptive `h1` on login screens. Add an `h1` heading with the existing `login_header()` text string on each view of the login screen. Mark the existing `h1`, used to wrap the WordPress logo, with `role="presentation"`, to remove it from the headings hierarchy. Props roytanck, joedolson, ryokuhi, sabernhardt, pamprn, nagpai, mukesh27. Fixes #51786. git-svn-id: https://develop.svn.wordpress.org/trunk@59138 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/login.css | 12 ++++++------ src/wp-login.php | 11 +++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index 22f71984b06b3..57465ea586479 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -224,7 +224,7 @@ p { margin: 1.1em 0; } -.login h1.admin-email__heading { +.login .admin-email__heading { border-bottom: 1px #f0f0f1 solid; color: #50575e; font-weight: normal; @@ -269,11 +269,11 @@ p { vertical-align: baseline; } -.login h1 { +.login .wp-login-logo { text-align: center; } -.login h1 a { +.login .wp-login-logo a { background-image: url(../images/w-logo-blue.png?ver=20131202); background-image: none, url(../images/wordpress-logo.svg?ver=20131107); background-size: 84px; @@ -323,13 +323,13 @@ p { .login #nav a:hover, .login #backtoblog a:hover, -.login h1 a:hover { +.login .wp-login-logo a:hover { color: #135e96; } .login #nav a:focus, .login #backtoblog a:focus, -.login h1 a:focus { +.login .wp-login-logo a:focus { color: #043959; } @@ -390,7 +390,7 @@ body.interim-login { margin: 5px auto 20px; } -.interim-login.login h1 a { +.interim-login.login .wp-login-logo a { width: auto; } diff --git a/src/wp-login.php b/src/wp-login.php index bbab4ee419e61..fb419ac4454ab 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -210,10 +210,16 @@ function login_header( $title = null, $message = '', $wp_error = null ) { * @since 4.6.0 */ do_action( 'login_header' ); - + ?> + +

+
-

+

+