WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:14:38 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Improve settings tables and forms after [45403].

  • adds role="presentation" to the edit comment table
  • removes a few pointless <fieldset> elements
  • adds a few missing <label> elements
  • adds the CSS class class="td-full" to table rows spanning to multiple cells
  • adds explicit scope="row" attribute to the table headers in options-permalink.php: this table is better communicated as data table
  • uses consistent label association in the "Privacy Settings" page
  • in the installation page "Set up your database connection": associates descriptions to their inout fields using aria-describedby
  • improves the link to gravatar.com in the user-edit.php page

Props afercia.
Merges [45416] to the 5.2 branch.
See #46899.
Fixes #47390.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/setup-config.php

    r45834 r45835  
    211211        <tr>
    212212            <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
    213             <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress"<?php echo $autofocus; ?>/></td>
    214             <td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
     213            <td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" value="wordpress"<?php echo $autofocus; ?>/></td>
     214            <td id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
    215215        </tr>
    216216        <tr>
    217217            <th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
    218             <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
    219             <td><?php _e( 'Your database username.' ); ?></td>
     218            <td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
     219            <td id="uname-desc"><?php _e( 'Your database username.' ); ?></td>
    220220        </tr>
    221221        <tr>
    222222            <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
    223             <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td>
    224             <td><?php _e( 'Your database password.' ); ?></td>
     223            <td><input name="pwd" id="pwd" type="text" aria-describedby="pwd-desc" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td>
     224            <td id="pwd-desc"><?php _e( 'Your database password.' ); ?></td>
    225225        </tr>
    226226        <tr>
    227227            <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
    228             <td><input name="dbhost" id="dbhost" type="text" size="25" value="localhost" /></td>
    229             <td>
     228            <td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" /></td>
     229            <td id="dbhost-desc">
    230230            <?php
    231231                /* translators: %s: localhost */
     
    236236        <tr>
    237237            <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
    238             <td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td>
    239             <td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
     238            <td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" /></td>
     239            <td id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
    240240        </tr>
    241241    </table>
Note: See TracChangeset for help on using the changeset viewer.