[wp-trac] [WordPress Trac] #61014: Duplicate HTML id attribute in Quick/Bulk Edit on pages and post list
WordPress Trac
noreply at wordpress.org
Wed May 8 05:54:07 UTC 2024
#61014: Duplicate HTML id attribute in Quick/Bulk Edit on pages and post list
--------------------------------------+--------------------------------
Reporter: zodiac1978 | Owner: rcreators
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Quick/Bulk Edit | Version:
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses: ui, accessibility
--------------------------------------+--------------------------------
Comment (by rcreators):
Hey @joedolson It looks like an easy one but it's a complicated issue
which needs a core update. Here is my analysis.
The duplicate ID is generated only 2 times on a page
1) First as an inline edit template
2) When you click on quick edit for any item it will take the inline edit
template and add it to the view.
So I looked into
{{{
$wp_list_table->inline_edit()
}}}
This function is loading any hierarchical data with WordPress native
{{{
wp_dropdown_pages
}}}
I tried to add args id = '' but that didn't seem to work as
wp_dropdown_pages has backward compatibility for id in case of empty.
{{{
// Back-compat with old system where both id and name were based on $name
argument.
if ( empty( $parsed_args['id'] ) ) {
$parsed_args['id'] = $parsed_args['name'];
}
}}}
I am not sure now if we should remove this code or not but whatever we put
in the id or name, it will always get duplicated when anyone clicks on a
page.
Now the main point is, do we have to move on this one further as it's not
that much a bigger issue and by default or in source code, you won't find
duplicate ID. It's only getting added by Javascript when anyone clicks on
quick edit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61014#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list