Block support: ariaLabel
This document is part of the WordPress block reference and is intended for developers.
Last updated March 13, 2025.
How to add aria-label to blocks
Among the WordPress core blocks, the arial-label (ariaLabel) block support is exclusively enabled for the group block and navigation block. This is an accessibility enhancement that lets developers use aria-label to add accessible names to blocks without causing block validation errors.
The group block does not have an interface where you can change the label. In the navigation block, the aria-label is changed by updating the “Menu name” option.
ariaLabel is opt-in. You can enable it in your custom block by setting supports > ariaLabel to true:
"supports": {
"ariaLabel": true
}
You can add aria-labels to group blocks in the markup:
<!-- wp:group {"tagName":"aside","layout":{"type":"constrained"}} -->
<aside aria-label="first aside" class="wp-block-group">
<!-- wp:paragraph --><p>Aside 1</p><!-- /wp:paragraph -->
</aside>
<!-- /wp:group -->
View blocks per attribute or block support: