Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting role attributes on core blocks #46002

Open
carolinan opened this issue Nov 23, 2022 · 1 comment
Open

Allow setting role attributes on core blocks #46002

carolinan opened this issue Nov 23, 2022 · 1 comment
Assignees
Labels
[Package] Block library /packages/block-library [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@carolinan
Copy link
Contributor

carolinan commented Nov 23, 2022

What problem does this address?

Adding a role attribute, (for example role="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.

@carolinan carolinan added the [Type] Enhancement A suggestion for improvement. label Nov 23, 2022
@carolinan carolinan self-assigned this Feb 8, 2023
@gziolo gziolo added [Feature] Block API API that allows to express the block paradigm. Needs Dev Ready for, and needs developer efforts labels Feb 10, 2023
@gziolo
Copy link
Member

gziolo commented Feb 10, 2023

It sounds like a very good idea that is aligned with how other advanced HTML attributes are handled.

@gziolo gziolo mentioned this issue Feb 10, 2023
58 tasks
@gziolo gziolo added [Status] In Progress Tracking issues with work in progress and removed Needs Dev Ready for, and needs developer efforts labels Feb 10, 2023
@gziolo gziolo added [Package] Block library /packages/block-library and removed [Feature] Block API API that allows to express the block paradigm. labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block library /packages/block-library [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants