WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:12:44 AM (2 months 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/includes/ms.php

    r45318 r45834  
    803803function choose_primary_blog() {
    804804    ?>
    805     <table class="form-table">
     805    <table class="form-table" role="presentation">
    806806    <tr>
    807807    <?php /* translators: My sites label */ ?>
     
    915915    $admin_out   = '<option value="' . esc_attr( $current_user->ID ) . '">' . $current_user->user_login . '</option>';
    916916    ?>
    917     <table class="form-table">
     917    <table class="form-table" role="presentation">
    918918    <?php
    919919    foreach ( ( $allusers = (array) $_POST['allusers'] ) as $user_id ) {
Note: See TracChangeset for help on using the changeset viewer.