Make WordPress Core


Ignore:
Timestamp:
02/01/2020 09:36:44 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Text Changes: Use sentence case for the word Error in various error messages, instead of all caps.

Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.

Props afercia, ryokuhi, sabernhardt, garrett-eclipse.
See #47656, #43037, #42945.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r47122 r47156  
    368368
    369369        if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
    370                 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Enter a username or email address.' ) );
     370                $errors->add( 'empty_username', __( '<strong>Error</strong>: Enter a username or email address.' ) );
    371371        } elseif ( strpos( $_POST['user_login'], '@' ) ) {
    372372                $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
    373373                if ( empty( $user_data ) ) {
    374                         $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) );
     374                        $errors->add( 'invalid_email', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
    375375                }
    376376        } else {
     
    397397
    398398        if ( ! $user_data ) {
    399                 $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) );
     399                $errors->add( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
    400400                return $errors;
    401401        }
     
    464464                        sprintf(
    465465                                /* translators: %s: Documentation URL. */
    466                                 __( '<strong>ERROR</strong>: The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ),
     466                                __( '<strong>Error</strong>: The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ),
    467467                                esc_url( __( 'https://wordpress.org/support/article/resetting-your-password/' ) )
    468468                        )
     
    12071207                                        sprintf(
    12081208                                                /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */
    1209                                                 __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
     1209                                                __( '<strong>Error</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
    12101210                                                __( 'https://wordpress.org/support/article/cookies/' ),
    12111211                                                __( 'https://wordpress.org/support/forums/' )
     
    12181218                                        sprintf(
    12191219                                                /* translators: %s: Browser cookie documentation URL. */
    1220                                                 __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
     1220                                                __( '<strong>Error</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
    12211221                                                __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' )
    12221222                                        )
Note: See TracChangeset for help on using the changeset viewer.