Block support: ariaLabel

This document is part of the WordPress block reference and is intended for developers.

Block supports are a set of options that enables or disables block controls in the editor. Block supports are added to the block’s block.json file during block development (Not to be confused with theme.json which is used in theme development).


Last updated January 27, 2023.

Among the WordPress core blocks, the arial-label (ariaLabel) block support is exclusively enabled for the group block. This is an accessibility enhancement that lets developers use aria-label to add accessible names to groups without causing block validation errors.
This block support has no interface exposed to users.

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 -->
<!-- /wp:group -->

View blocks per attribute or block support: