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

WordPress Trac noreply at wordpress.org
Tue Jul 27 14:24:37 UTC 2021


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

 * keywords:  has-screenshots needs-patch => has-screenshots has-patch
 * priority:  high => normal


Comment:

 Using a combination of core and plugin files, I think we could maintain
 the ID on a single container around the 'normal' and 'advanced' forms.
 Then the 'side' meta box would rely on different (custom) styling instead
 of the ID.

 [attachment:"46964.5.diff"] removes the IDs from the loop, adds a
 `poststuff` class, and adds selectors with the class (for use in sidebar
 meta box).

 Still to do in a Gutenberg PR:
 -
 [https://github.com/WordPress/gutenberg/blob/36363b9d6f249c2cd814bc88327e49742b764cca/packages
 /edit-post/src/components/layout/index.js#L240 Adding `poststuff` ID to
 `edit-post-layout__metaboxes` div]
 -
 [https://github.com/WordPress/gutenberg/blob/12a88045b301b83179d6100cfad2189b45bb3791/packages
 /edit-post/src/components/meta-boxes/meta-boxes-area/style.scss#L29-L40
 Adding styles for sidebar meta box]
 {{{
         #poststuff h2.hndle,
         .poststuff h2.hndle { /* WordPress selectors yolo */
                 box-sizing: border-box;
                 color: inherit;
                 font-size: 14px;
                 line-height: 1.4;
                 font-weight: 600;
                 outline: none;
                 margin: 0;
                 padding: 16px;
                 position: relative;
                 width: 100%;
         }
 }}}

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


More information about the wp-trac mailing list