Allow setting role attributes on core blocks #46002
Labels
[Package] Block library
/packages/block-library
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Adding a
role
attribute, (for examplerole="button"
) to a core block causes a block validation error.Allowing the role attribute would increase the flexibility for theme and plugin authors. It would compliment and not be as limited as the HTML element selection option that is in the Advanced panel for supported blocks.
To add a
role
attribute right now you would need to filter the block (or even create a custom block).What is your proposed solution?
Similar to the aria label added in #41744, the
role
should be a block support but not have a UI, because it is an advanced feature.The text was updated successfully, but these errors were encountered: