Make WordPress Core


Ignore:
Timestamp:
07/21/2022 09:02:52 AM (3 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r53458 r53745  
    394394            setup_config_display_header();
    395395            ?>
    396     <p>
     396<p>
    397397            <?php
    398398            /* translators: %s: wp-config.php */
     
    400400            ?>
    401401</p>
    402 <p>
     402<p id="wp-config-description">
    403403            <?php
    404404            /* translators: %s: wp-config.php */
     
    412412            ?>
    413413</p>
    414 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
     414<p class="configuration-rules-label"><label for="wp-config">
     415            <?php
     416            /* translators: %s: wp-config.php */
     417            printf( __( 'Configuration rules for %s:' ), '<code>wp-config.php</code>' );
     418            ?>
     419    </label></p>
     420<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly" aria-describedby="wp-config-description"><?php echo $config_text; ?></textarea>
    415421<p><?php _e( 'After you&#8217;ve done that, click &#8220;Run the installation&#8221;.' ); ?></p>
    416422<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
Note: See TracChangeset for help on using the changeset viewer.