Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:12:44 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Make sure layout tables across the admin are correctly linearized.

Adds role="presentation" to the <table> elements used for layout purposes.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props greatislander, afercia.
Merges [45403] to the 5.2 branch.
See #46899.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/network/settings.php

    r45140 r45834  
    149149        <?php wp_nonce_field( 'siteoptions' ); ?>
    150150        <h2><?php _e( 'Operational Settings' ); ?></h2>
    151         <table class="form-table">
     151        <table class="form-table" role="presentation">
    152152            <tr>
    153153                <th scope="row"><label for="site_name"><?php _e( 'Network Title' ); ?></label></th>
     
    189189        </table>
    190190        <h2><?php _e( 'Registration Settings' ); ?></h2>
    191         <table class="form-table">
     191        <table class="form-table" role="presentation">
    192192            <tr>
    193193                <th scope="row"><?php _e( 'Allow new registrations' ); ?></th>
     
    278278        </table>
    279279        <h2><?php _e( 'New Site Settings' ); ?></h2>
    280         <table class="form-table">
     280        <table class="form-table" role="presentation">
    281281
    282282            <tr>
     
    359359        </table>
    360360        <h2><?php _e( 'Upload Settings' ); ?></h2>
    361         <table class="form-table">
     361        <table class="form-table" role="presentation">
    362362            <tr>
    363363                <th scope="row"><?php _e( 'Site upload space' ); ?></th>
     
    403403            ?>
    404404            <h2><?php _e( 'Language Settings' ); ?></h2>
    405             <table class="form-table">
     405            <table class="form-table" role="presentation">
    406406                <tr>
    407407                    <th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th>
Note: See TracChangeset for help on using the changeset viewer.