Administration: Add labels to read-only form fields.

This changeset improves admin forms accessibility by adding labels to the following read-only form fields:

- Network setup screen: new visible label to the four textareas for code users need to paste into their wp-config file and the server configuration file (web.config or .htaccess).
- `setup-config.php`: new visible label to one textarea for code to include in the `wp-config` file manually.
- Admin toolbar: adds an `arial-label` attribute to the old "shortlink" feature (not used anymore but still activable by plugins).

Props sabernhardt, audrasjb, ryokuhi, joedolson.
Fixes #54302.


git-svn-id: https://develop.svn.wordpress.org/trunk@53745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2022-07-21 09:02:52 +00:00
parent 3a20f3e4c5
commit bf61851c38
4 changed files with 51 additions and 12 deletions
+9 -3
View File
@@ -393,13 +393,13 @@ switch ( $step ) {
if ( ! is_writable( ABSPATH ) ) :
setup_config_display_header();
?>
<p>
<p>
<?php
/* translators: %s: wp-config.php */
printf( __( 'Unable to write to %s file.' ), '<code>wp-config.php</code>' );
?>
</p>
<p>
<p id="wp-config-description">
<?php
/* translators: %s: wp-config.php */
printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
@@ -411,7 +411,13 @@ switch ( $step ) {
}
?>
</p>
<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
<p class="configuration-rules-label"><label for="wp-config">
<?php
/* translators: %s: wp-config.php */
printf( __( 'Configuration rules for %s:' ), '<code>wp-config.php</code>' );
?>
</label></p>
<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly" aria-describedby="wp-config-description"><?php echo $config_text; ?></textarea>
<p><?php _e( 'After you&#8217;ve done that, click &#8220;Run the installation&#8221;.' ); ?></p>
<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
<script>