Make WordPress Core


Ignore:
Timestamp:
04/07/2022 04:42:11 PM (4 years ago)
Author:
joedolson
Message:

Quick/Bulk Edit: Fix initial focus and keyboard operability.

Fix the quick and bulk edit forms to set an appropriate initial focus, use native HTML controls for all interactions, and set appropriate labels for controls. Improve the semantics of HTML wrappers so lists are enumerable by screen readers.

Props afercia, azaozz.
Fixes #35483.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r53049 r53096  
    16121612            <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none">
    16131613            <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
    1614 
     1614            <div class="inline-edit-wrapper" role="region" aria-labelledby="inline-edit-legend">
    16151615            <fieldset class="inline-edit-col-left">
    1616                 <legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
     1616                <legend class="inline-edit-legend" id="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
    16171617                <div class="inline-edit-col">
    16181618
     
    18291829                        <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
    18301830                            <?php $taxonomy_name = esc_attr( $taxonomy->name ); ?>
    1831 
     1831                            <div class="inline-edit-tags-wrap">
    18321832                            <label class="inline-edit-tags">
    18331833                                <span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
    1834                                 <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
     1834                                <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name ); ?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name ); ?>" aria-describedby="inline-edit-<?php echo esc_attr( $taxonomy->name ); ?>-desc"></textarea>
    18351835                            </label>
    1836 
     1836                            <p class="howto" id="inline-edit-<?php echo esc_attr( $taxonomy->name ); ?>-desc"><?php echo esc_html( $taxonomy->labels->separate_items_with_commas ); ?></p>
     1837                            </div>
    18371838                        <?php endif; // current_user_can( 'assign_terms' ) ?>
    18381839
     
    20312032                </div>
    20322033            </div>
     2034        </div> <!-- end of .inline-edit-wrapper -->
    20332035
    20342036            </td></tr>
Note: See TracChangeset for help on using the changeset viewer.