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

WordPress Trac noreply at wordpress.org
Thu Feb 5 14:52:04 UTC 2026


#64603: get_block_wrapper_attributes: id and aria-label should not be merged
--------------------------+---------------------
 Reporter:  wildworks     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  7.0
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------
Description changed by wildworks:

Old description:

> Originally reported in
> https://github.com/WordPress/gutenberg/issues/75251
>
> If a dynamic block supports `id` or `aria-label`, those attributes are
> automatically injected into the block via the
> `get_block_wrapper_attributes` function. However, if the user explicitly
> passes them, they are merged, resulting in a space between them. This is
> not the correct format, especially for `id`.
>
> Perhaps the `id` and `aria-label` attributes should respect explicit
> user-added values ​​instead of being merged.
>
> In particular, the `anchor` support (`id`) added to all dynamic blocks in
> the 6.9 release may affect many consumers, so let's fix that in the 7.0
> release.

New description:

 Originally reported in https://github.com/WordPress/gutenberg/issues/75251

 props to @mamaduka, @adrock42.

 If a dynamic block supports `id` or `aria-label`, those attributes are
 automatically injected into the block via the
 `get_block_wrapper_attributes` function. However, if the user explicitly
 passes them, they are merged, resulting in a space between them. This is
 not the correct format, especially for `id`.

 Perhaps the `id` and `aria-label` attributes should respect explicit user-
 added values ​​instead of being merged.

 In particular, the `anchor` support (`id`) added to all dynamic blocks in
 the 6.9 release may affect many consumers, so let's fix that in the 7.0
 release.

--

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


More information about the wp-trac mailing list