WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/24/2019 09:55:21 PM (3 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/options-reading.php

    r45401 r45403  
    6262<?php if ( ! get_pages() ) : ?>
    6363<input name="show_on_front" type="hidden" value="posts" />
    64 <table class="form-table">
     64<table class="form-table" role="presentation">
    6565    <?php
    6666    if ( 'posts' != get_option( 'show_on_front' ) ) :
     
    7373    }
    7474    ?>
    75 <table class="form-table">
     75<table class="form-table" role="presentation">
    7676<tr>
    7777<th scope="row"><?php _e( 'Your homepage displays' ); ?></th>
Note: See TracChangeset for help on using the changeset viewer.