Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:14:38 AM (5 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/network/settings.php

    r45834 r45835  
    453453             * @param string[] $admin_menus Associative array of the menu items available.
    454454             */
    455             $menu_items   = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
    456             $fieldset_end = '';
    457             if ( count( (array) $menu_items ) > 1 ) {
    458                 echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
    459                 $fieldset_end = '</fieldset>';
    460             }
     455            $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
     456
     457            echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
     458
    461459            foreach ( (array) $menu_items as $key => $val ) {
    462460                echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . ' /> ' . esc_html( $val ) . '</label><br/>';
    463461            }
    464             echo $fieldset_end;
     462
     463            echo '</fieldset>';
    465464            ?>
    466465                </td>
Note: See TracChangeset for help on using the changeset viewer.