WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/23/2015 02:28:41 AM (7 years ago)
Author:
jeremyfelt
Message:

Provide proper label associations and descriptions throughout the network admin

  • Add labels previously missing for many inputs throughout the network admin screen.
  • Add proper aria-describedby attributes to provide better descriptions.
  • Wrap grouped inputs with fieldset elements.
  • Remove now unneeded title attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-settings.php

    r28712 r31517  
    139139            ?>
    140140                <tr class="form-field">
    141                     <th scope="row"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></th>
     141                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></label></th>
    142142                    <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ) ?>]" id="<?php echo esc_attr( $option->option_name ) ?>"<?php disabled( $disabled ) ?>><?php echo esc_textarea( $option->option_value ) ?></textarea></td>
    143143                </tr>
     
    146146            ?>
    147147                <tr class="form-field">
    148                     <th scope="row"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></th>
     148                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></label></th>
    149149                    <?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
    150150                    <td><code><?php echo esc_html( $option->option_value ) ?></code></td>
Note: See TracChangeset for help on using the changeset viewer.