This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
Better assign aria-*
attributes to interactive block elements
#84
Labels
Milestone
Is your suggestion related to a problem? Please describe.
Blocks that serve as event triggers need ARIA attributes and there is no clear way to do that at the block or template level. When I add attributes directly the block in a template it triggers a block error in the editor. There are two ways around this that I've found:
render_block
filter to intercept specific blocks and filter the content usingWP_HTML_Tag_Processor
. This doesn't seem to work consistently for all blocks -- hidden elements appear to be ignored.Describe alternatives you have considered.
The current methods work alright, but there should be a more reliable, consistent, and performant method.
The text was updated successfully, but these errors were encountered: