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/options-media.php

    r45140 r45834  
    5252<p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
    5353
    54 <table class="form-table">
     54<table class="form-table" role="presentation">
    5555<tr>
    5656<th scope="row"><?php _e( 'Thumbnail size' ); ?></th>
     
    9999    ?>
    100100<h2 class="title"><?php _e( 'Embeds' ); ?></h2>
    101 <table class="form-table">
     101<table class="form-table" role="presentation">
    102102    <?php do_settings_fields( 'media', 'embeds' ); ?>
    103103</table>
     
    106106<?php if ( ! is_multisite() ) : ?>
    107107<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
    108 <table class="form-table">
     108<table class="form-table" role="presentation">
    109109    <?php
    110110    // If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
Note: See TracChangeset for help on using the changeset viewer.