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.
Fixes #55575.
See #35483.


Built from https://develop.svn.wordpress.org/trunk@53352


git-svn-id: http://core.svn.wordpress.org/trunk@52941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2022-05-05 03:26:16 +00:00
parent 18c2eaa8c0
commit a34abb93b7
4 changed files with 8 additions and 4 deletions

View File

@ -1611,9 +1611,9 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
<tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none">
<td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
<div class="inline-edit-wrapper" role="region" aria-labelledby="inline-edit-legend">
<div class="inline-edit-wrapper" role="region" aria-labelledby="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend">
<fieldset class="inline-edit-col-left">
<legend class="inline-edit-legend" id="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
<legend class="inline-edit-legend" id="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
<div class="inline-edit-col">
<?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?>

View File

@ -294,6 +294,10 @@ window.wp = window.wp || {};
editRow = $('#inline-edit').clone(true);
$( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
// Remove the ID from the copied row and let the `for` attribute reference the hidden ID.
$( 'td', editRow ).find('#quick-edit-legend').removeAttr('id');
$( 'td', editRow ).find('p[id^="quick-edit-"]').removeAttr('id');
$(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>');
// Populate fields in the quick edit window.

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53349';
$wp_version = '6.1-alpha-53352';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.