WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2019 11:52:32 AM (5 weeks ago)
Author:
afercia
Message:

Accessibility: Login and Registration: Improve the invalid username and invalid email messages.

  • explicitly informs users they can use their email to log in as an alternative to their username and vice-versa
  • shows the Lost your password? link only when an wrong password has been entered
  • uses a more appropriate copy by changing "invalid" to "unknown"
  • removes the all caps ERROR

Props subrataemfluence, zalak151291, ryokuhi, SergeyBiryukov, audrasjb, joedolson, marybaum, ramiy, markjaquith, chanthaboune, afercia.
Fixes #43037.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r46088 r46417  
    150150        return new WP_Error(
    151151            'invalid_username',
    152             __( '<strong>ERROR</strong>: Invalid username.' ) .
    153             ' <a href="' . wp_lostpassword_url() . '">' .
    154             __( 'Lost your password?' ) .
    155             '</a>'
     152            __( 'Unknown username. Check again or try your email address.' )
    156153        );
    157154    }
     
    231228        return new WP_Error(
    232229            'invalid_email',
    233             __( '<strong>ERROR</strong>: Invalid email address.' ) .
    234             ' <a href="' . wp_lostpassword_url() . '">' .
    235             __( 'Lost your password?' ) .
    236             '</a>'
     230            __( 'Unknown email address. Check again or try your username.' )
    237231        );
    238232    }
Note: See TracChangeset for help on using the changeset viewer.