[wp-trac] [WordPress Trac] #46964: ID attribute value are used multiple times in "Custom Field" form

WordPress Trac noreply at wordpress.org
Tue Aug 6 04:53:08 UTC 2019


#46964: ID attribute value are used multiple times in "Custom Field" form
-------------------------------------------------+-------------------------
 Reporter:  jankimoradiya                        |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.3
Component:  Editor                               |     Version:  5.0
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-screenshots has-    |     Focuses:  ui,
  patch                                          |  accessibility
-------------------------------------------------+-------------------------
Changes (by donmhico):

 * keywords:  needs-patch dev-feedback has-screenshots => dev-feedback has-
     screenshots has-patch


Comment:

 The main culprit for this, like @afercia mentioned, is the function
 `the_block_editor_meta_boxes()`. Specifically this block of code.

 {{{
 <?php foreach ( $locations as $location ) : ?>
     <form class="metabox-location-<?php echo esc_attr( $location ); ?>"
 onsubmit="return false;">
         <div id="poststuff" class="sidebar-open">
             <div id="postbox-container-2" class="postbox-container">
                 <?php
                     do_meta_boxes(
                         $current_screen,
                         $location,
                         $post
                     );
                 ?>
             </div>
         </div>
     </form>
 <?php endforeach; ?>
 }}}

 I think changing them to classes would be better than removing them. I
 also checked and only `#postbox-container-2`is inside a loop. The other
 ones `#postbox-container-1`, `#postbox-container-3`, and `#postbox-
 container-4` are not.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46964#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list