A WordPress plugin that allows you to add custom HTML attributes to all Gutenberg blocks.
Block Attributes is a WordPress plugin that extends the Gutenberg editor by allowing users to add custom HTML attributes to any block. This functionality is particularly useful for:
- Adding
data-*attributes for custom JavaScript integrations - Setting ARIA accessibility attributes
- Customizing block behavior with standard HTML attributes
- Intuitive User Interface: Integrated inspector panel in the Gutenberg editor
- Security: Attribute validation according to global HTML standards
data-*Attributes Support: Full support for custom data attributes- Accessibility: ARIA attributes support
- Flexibility: Works with all Gutenberg block types
- Edit a page or post in the Gutenberg editor
- Select a block you want to customize
- Open the inspector panel (right sidebar)
- Find the "Attributes" section in the block settings
- Click "Add Attribute" to add a new attribute
- Enter the name and value of the attribute
- Save your content
The plugin validates all attributes according to WordPress global HTML standards. Only allowed attributes are applied to the final markup:
- Standard global HTML attributes
data-*attributes with format validation- Filtering and escaping of all values