From bf61851c38eab893c32c6505c1979b881ba5aebc Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 21 Jul 2022 09:02:52 +0000 Subject: [PATCH] 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 --- src/wp-admin/css/forms.css | 5 ++++ src/wp-admin/includes/network.php | 44 +++++++++++++++++++++++++------ src/wp-admin/setup-config.php | 12 ++++++--- src/wp-includes/admin-bar.php | 2 +- 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 6db6d188a8..ff8de1c4f9 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -1130,6 +1130,11 @@ table.form-table td .updated p { max-width: 60%; } +.configuration-rules-label { + font-weight: 600; + margin-bottom: 4px; +} + /*------------------------------------------------------------------------------ Credentials check dialog for Install and Updates ------------------------------------------------------------------------------*/ diff --git a/src/wp-admin/includes/network.php b/src/wp-admin/includes/network.php index ae3e906fcc..aef0b2e4b6 100644 --- a/src/wp-admin/includes/network.php +++ b/src/wp-admin/includes/network.php @@ -470,7 +470,7 @@ function network_step2( $errors = false ) { } ?>
    -
  1. +

  2. - +

    + @@ -603,7 +613,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); '; - echo '
  3. '; + echo '

  4. '; printf( /* translators: 1: File name (.htaccess or web.config), 2: File path. */ __( 'Add the following to your %1$s file in %2$s, replacing other WordPress rules:' ), @@ -615,7 +625,16 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); echo '

    ' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '

    '; } ?> - +

    +
@@ -656,7 +675,7 @@ RewriteRule . index.php [L] EOF; - echo '
  • '; + echo '

  • '; printf( /* translators: 1: File name (.htaccess or web.config), 2: File path. */ __( 'Add the following to your %1$s file in %2$s, replacing other WordPress rules:' ), @@ -668,7 +687,16 @@ EOF; echo '

    ' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '

    '; } ?> - +

    +
  • diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index 86c2fbce7f..b1b7a16ccb 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -393,13 +393,13 @@ switch ( $step ) { if ( ! is_writable( ABSPATH ) ) : setup_config_display_header(); ?> -

    +

    wp-config.php' ); ?>

    -

    +

    wp-config.php' ); @@ -411,7 +411,13 @@ switch ( $step ) { } ?>

    - +

    +