[wp-trac] [WordPress Trac] #64603: get_block_wrapper_attributes: id and aria-label should not be merged

WordPress Trac noreply at wordpress.org
Thu Mar 19 14:39:59 UTC 2026


#64603: get_block_wrapper_attributes: id and aria-label should not be merged
--------------------------------------+------------------------
 Reporter:  wildworks                 |       Owner:  wildworks
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  7.0
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------
Changes (by wildworks):

 * owner:  (none) => wildworks
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"62068" 62068]:
 {{{
 #!CommitTicketReference repository="" revision="62068"
 Blocks: Fix wrapper attribute merging in `get_block_wrapper_attributes()`.

 Replace the previous generic concatenation logic in
 `get_block_wrapper_attributes()` with attribute-specific merge behavior:

 - Add explicit merge callbacks for each attribute.
 - Merge style values safely, normalize trailing semicolons, and sanitize
 the result.
 - Merge class values with deduplication .
 - Treat id and aria-label as override attributes, giving precedence to
 explicitly passed extra attributes.

 Props adrock42, mamaduka, r1k0, westonruter, wildworks.

 Fixes #64603.
 }}}

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


More information about the wp-trac mailing list