Make WordPress Core


Ignore:
Timestamp:
05/24/2019 09:55:21 PM (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.
Fixes #46899.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-header.php

    r45140 r45403  
    491491<h3><?php _e( 'Header Image' ); ?></h3>
    492492
    493 <table class="form-table">
     493<table class="form-table" role="presentation">
    494494<tbody>
    495495
     
    629629<form method="post" action="<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>">
    630630        <?php submit_button( null, 'screen-reader-text', 'save-header-options', false ); ?>
    631 <table class="form-table">
     631<table class="form-table" role="presentation">
    632632<tbody>
    633633        <?php if ( get_uploaded_header_images() ) : ?>
     
    690690<h3><?php _e( 'Header Text' ); ?></h3>
    691691
    692 <table class="form-table">
     692<table class="form-table" role="presentation">
    693693<tbody>
    694694<tr>
Note: See TracChangeset for help on using the changeset viewer.