“This block contains unexpected or invalid content” when adding aria-label
-
Hi,
The System is running on WordPress 5.4 and is using the Avada-Theme(8.7)
I am trying to add a aria-label or data-label attribute to some titles(h2s) in my blogposts so i can use an alternative title via Javascript.
When I am adding either an aria-label or data-label to a title, the Gutenberg Editor recognizeses this block as incorrect html (“This block contains unexpected or invalid content”) and won`t show the normal block. Even tho it should still be considered correct HTML?So i am not really sure if this is a bug or wanted behaviour. If it is the desired behaviour, is there a way to add an alternative title to a title without loosing the normal presentation of the block in the Gutenberg editor or is there a possiblilty to disable the feature that detects incorrect HTML?
If it is helpful, I found one topic about kind of the same issue in a different use case here: https://www.ads-software.com/support/topic/disable-warning-this-block-contains-unexpected-or-invalid-content-in-html-bloc/#post-13249461
Greetings & Looking forward to an answer
- The topic ‘“This block contains unexpected or invalid content” when adding aria-label’ is closed to new replies.