Make WordPress Core

Changeset 53361


Ignore:
Timestamp:
05/07/2022 03:08:24 AM (3 years ago)
Author:
peterwilsoncc
Message:

Quick/Bulk Edit: Remove duplicate HTML IDs.

Rename #inline-edit-legend to avoid duplicate HTML IDs. These have been renamed #quick-edit-legend and #bulk-edit-legend for the quick and bulk editors respectively.

This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.

Follow up to [53096].

Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt, SergeyBiryukov, audrasjb.
Merges [53352] to the 6.0 branch.
Fixes #55575.
See #35483.

Location:
branches/6.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/src/js/_enqueues/admin/inline-edit-post.js

    r53096 r53361  
    294294        editRow = $('#inline-edit').clone(true);
    295295        $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
     296
     297        // Remove the ID from the copied row and let the `for` attribute reference the hidden ID.
     298        $( 'td', editRow ).find('#quick-edit-legend').removeAttr('id');
     299        $( 'td', editRow ).find('p[id^="quick-edit-"]').removeAttr('id');
    296300
    297301        $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>');
  • branches/6.0/src/wp-admin/includes/class-wp-posts-list-table.php

    r53116 r53361  
    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             <div class="inline-edit-wrapper" role="region" aria-labelledby="inline-edit-legend">
     1614            <div class="inline-edit-wrapper" role="region" aria-labelledby="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend">
    16151615            <fieldset class="inline-edit-col-left">
    1616                 <legend class="inline-edit-legend" id="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
     1616                <legend class="inline-edit-legend" id="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
    16171617                <div class="inline-edit-col">
    16181618
Note: See TracChangeset for help on using the changeset viewer.