mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-09-16 14:00:26 +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:
@@ -802,7 +802,7 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) {
|
||||
*/
|
||||
function choose_primary_blog() {
|
||||
?>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<?php /* translators: My sites label */ ?>
|
||||
<th scope="row"><label for="primary_blog"><?php _e( 'Primary Site' ); ?></label></th>
|
||||
@@ -914,7 +914,7 @@ function confirm_delete_users( $users ) {
|
||||
$site_admins = get_super_admins();
|
||||
$admin_out = '<option value="' . esc_attr( $current_user->ID ) . '">' . $current_user->user_login . '</option>';
|
||||
?>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<?php
|
||||
foreach ( ( $allusers = (array) $_POST['allusers'] ) as $user_id ) {
|
||||
if ( $user_id != '' && $user_id != '0' ) {
|
||||
|
||||
@@ -223,7 +223,7 @@ function network_step1( $errors = false ) {
|
||||
<strong><?php _e( 'You cannot change this later.' ); ?></strong></p>
|
||||
<p><?php _e( 'You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.' ); ?></p>
|
||||
<?php // @todo: Link to an MS readme? ?>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<th><label><input type="radio" name="subdomain_install" value="1"<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th>
|
||||
<td>
|
||||
@@ -272,7 +272,7 @@ function network_step1( $errors = false ) {
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<th scope='row'><?php esc_html_e( 'Server Address' ); ?></th>
|
||||
<td>
|
||||
@@ -289,7 +289,7 @@ function network_step1( $errors = false ) {
|
||||
<?php endif; ?>
|
||||
|
||||
<h3><?php esc_html_e( 'Network Details' ); ?></h3>
|
||||
<table class="form-table">
|
||||
<table class="form-table" role="presentation">
|
||||
<?php if ( 'localhost' == $hostname ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e( 'Sub-directory Installation' ); ?></th>
|
||||
|
||||
@@ -1605,7 +1605,7 @@ function do_settings_sections( $page ) {
|
||||
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) {
|
||||
continue;
|
||||
}
|
||||
echo '<table class="form-table">';
|
||||
echo '<table class="form-table" role="presentation">';
|
||||
do_settings_fields( $page, $section['id'] );
|
||||
echo '</table>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user