Make WordPress Core

Changeset 50830


Ignore:
Timestamp:
05/07/2021 11:49:15 PM (3 years ago)
Author:
joedolson
Message:

Permalinks: Add labels for permalink configuration fields.

If the current server configuration doesn't allow WordPress to edit permalink settings, the textarea with new rules to use was not labeled. Add labels and aria-describedby pointing to the field description.

Props sabernhardt
Fixes #53142.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-permalink.php

    r48713 r50830  
    358358            if ( file_exists( $home_path . 'web.config' ) ) :
    359359                ?>
    360 <p>
     360<p id="iis-description-a">
    361361                <?php
    362362                printf(
     
    372372<form action="options-permalink.php" method="post">
    373373                <?php wp_nonce_field( 'update-permalink' ); ?>
    374     <p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
     374    <p><label for="rules"><?php _e( 'Rewrite rules:' ); ?></label><br /><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly" aria-describedby="iis-description-a"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
    375375</form>
    376376<p>
     
    384384</p>
    385385        <?php else : ?>
    386 <p>
     386<p id="iis-description-b">
    387387            <?php
    388388            printf(
     
    397397<form action="options-permalink.php" method="post">
    398398            <?php wp_nonce_field( 'update-permalink' ); ?>
    399     <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
     399    <p><label for="rules"><?php _e( 'Rewrite rules:' ); ?></label><br /><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly" aria-describedby="iis-description-b"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
    400400</form>
    401401<p>
     
    416416    if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $htaccess_update_required ) :
    417417        ?>
    418 <p>
     418<p id="htaccess-description">
    419419        <?php
    420420        printf(
     
    429429<form action="options-permalink.php" method="post">
    430430        <?php wp_nonce_field( 'update-permalink' ); ?>
    431     <p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>
     431    <p><label for="rules"><?php _e( 'Rewrite rules:' ); ?></label><br /><textarea rows="8" class="large-text readonly" name="rules" id="rules" readonly="readonly" aria-describedby="htaccess-description"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>
    432432</form>
    433433    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.