Accessibility: Remove negative tabindex from the login, install, and setup pages header.

Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.


git-svn-id: https://develop.svn.wordpress.org/trunk@44545 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2019-01-10 17:20:59 +00:00
parent 2d4ae6ce6d
commit 238e8991f8
6 changed files with 8 additions and 10 deletions

View File

@ -107,10 +107,6 @@ label {
display: block; display: block;
} }
#logo a:focus {
box-shadow: none;
}
.step { .step {
margin: 20px 0 15px; margin: 20px 0 15px;
} }

View File

@ -77,7 +77,7 @@ function display_header( $body_classes = '' ) {
?> ?>
</head> </head>
<body class="wp-core-ui<?php echo $body_classes; ?>"> <body class="wp-core-ui<?php echo $body_classes; ?>">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p> <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
<?php <?php
} // end display_header() } // end display_header()

View File

@ -23,7 +23,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
?> ?>
</head> </head>
<body class="wp-core-ui"> <body class="wp-core-ui">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p> <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
<?php <?php

View File

@ -113,7 +113,7 @@ function setup_config_display_header( $body_classes = array() ) {
<?php wp_admin_css( 'install', true ); ?> <?php wp_admin_css( 'install', true ); ?>
</head> </head>
<body class="<?php echo implode( ' ', $body_classes ); ?>"> <body class="<?php echo implode( ' ', $body_classes ); ?>">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p> <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
<?php <?php
} // end function setup_config_display_header(); } // end function setup_config_display_header();
@ -201,6 +201,8 @@ switch ( $step ) {
$GLOBALS['wp_locale'] = new WP_Locale(); $GLOBALS['wp_locale'] = new WP_Locale();
setup_config_display_header(); setup_config_display_header();
$autofocus = wp_is_mobile() ? '' : ' autofocus';
?> ?>
<h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1> <h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1>
<form method="post" action="setup-config.php?step=2"> <form method="post" action="setup-config.php?step=2">
@ -208,7 +210,7 @@ switch ( $step ) {
<table class="form-table"> <table class="form-table">
<tr> <tr>
<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th> <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
<td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td> <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress"<?php echo $autofocus; ?>/></td>
<td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td> <td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
</tr> </tr>
<tr> <tr>

View File

@ -70,7 +70,7 @@ if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
?> ?>
</head> </head>
<body class="wp-core-ui"> <body class="wp-core-ui">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p> <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
<?php if ( get_option( 'db_version' ) == $wp_db_version || ! is_blog_installed() ) : ?> <?php if ( get_option( 'db_version' ) == $wp_db_version || ! is_blog_installed() ) : ?>

View File

@ -187,7 +187,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
do_action( 'login_header' ); do_action( 'login_header' );
?> ?>
<div id="login"> <div id="login">
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php echo $login_header_text; ?></a></h1> <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"><?php echo $login_header_text; ?></a></h1>
<?php <?php
unset( $login_header_url, $login_header_title ); unset( $login_header_url, $login_header_title );