mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 12:44:30 +00:00
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. Fixes #46899. git-svn-id: https://develop.svn.wordpress.org/trunk@45403 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -51,7 +51,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<h2 class="title"><?php _e( 'Image sizes' ); ?></h2>
|
||||
<p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
|
||||
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Thumbnail size' ); ?></th>
|
||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Thumbnail size' ); ?></span></legend>
|
||||
@@ -98,14 +98,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
|
||||
?>
|
||||
<h2 class="title"><?php _e( 'Embeds' ); ?></h2>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<?php do_settings_fields( 'media', 'embeds' ); ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! is_multisite() ) : ?>
|
||||
<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<?php
|
||||
// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
|
||||
if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
|
||||
|
||||
Reference in New Issue
Block a user