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:
Sergey Biryukov
2019-05-24 21:55:21 +00:00
parent a4d9f02eef
commit a3fbc75237
23 changed files with 45 additions and 45 deletions

View File

@@ -246,7 +246,7 @@ class Custom_Background {
<h3><?php _e( 'Background Image' ); ?></h3>
<table class="form-table">
<table class="form-table" role="presentation">
<tbody>
<tr>
<th scope="row"><?php _e( 'Preview' ); ?></th>
@@ -340,7 +340,7 @@ class Custom_Background {
<h3><?php _e( 'Display Options' ); ?></h3>
<form method="post">
<table class="form-table">
<table class="form-table" role="presentation">
<tbody>
<?php if ( get_background_image() ) : ?>
<input name="background-preset" type="hidden" value="custom">