Make WordPress Core

Changeset 59138


Ignore:
Timestamp:
09/30/2024 07:10:22 PM (12 days ago)
Author:
joedolson
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/login.css

    r58567 r59138  
    225225}
    226226
    227 .login h1.admin-email__heading {
     227.login .admin-email__heading {
    228228    border-bottom: 1px #f0f0f1 solid;
    229229    color: #50575e;
     
    270270}
    271271
    272 .login h1 {
     272.login .wp-login-logo {
    273273    text-align: center;
    274274}
    275275
    276 .login h1 a {
     276.login .wp-login-logo a {
    277277    background-image: url(../images/w-logo-blue.png?ver=20131202);
    278278    background-image: none, url(../images/wordpress-logo.svg?ver=20131107);
     
    324324.login #nav a:hover,
    325325.login #backtoblog a:hover,
    326 .login h1 a:hover {
     326.login .wp-login-logo a:hover {
    327327    color: #135e96;
    328328}
     
    330330.login #nav a:focus,
    331331.login #backtoblog a:focus,
    332 .login h1 a:focus {
     332.login .wp-login-logo a:focus {
    333333    color: #043959;
    334334}
     
    391391}
    392392
    393 .interim-login.login h1 a {
     393.interim-login.login .wp-login-logo a {
    394394    width: auto;
    395395}
  • trunk/src/wp-login.php

    r59120 r59138  
    211211     */
    212212    do_action( 'login_header' );
    213 
     213    ?>
     214    <?php
     215    if ( 'confirm_admin_email' !== $action && ! empty( $title ) ) :
     216        ?>
     217        <h1 class="screen-reader-text"><?php echo $title; ?></h1>
     218        <?php
     219    endif;
    214220    ?>
    215221    <div id="login">
    216         <h1><a href="<?php echo esc_url( $login_header_url ); ?>"><?php echo $login_header_text; ?></a></h1>
     222        <h1 role="presentation" class="wp-login-logo"><a href="<?php echo esc_url( $login_header_url ); ?>"><?php echo $login_header_text; ?></a></h1>
    217223    <?php
    218224    /**
     
    421427        <?php } ?>
    422428    <?php } ?>
     429
    423430    <?php
    424431
Note: See TracChangeset for help on using the changeset viewer.