Open amberhinds opened 3 months ago
@amberhinds does the .has-background-dim
class matter here on either of these 2 pieces of block markup when it comes to determining if they are valid uses of aria-hidden or not?
I think you can use that as the attribute to ignore, probably. It's the span that overlays images to ensure text on them is readable on the cover block. You can see one on my website here: https://amberhinds.com/about/
Is your feature request related to a problem? Please describe.
There are some correct uses of aria-hidden related to core blocks that it would be good for us to exclude from flagging an aria-hidden warning because we know that they are correct.
Describe the solution you'd like
Here are the code snippets:
<span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span>
<span class="wp-block-post-featured-image__overlay has-background-dim has-background-dim-10 has-contrast-2-background-color" style="border-radius:5px" aria-hidden="true"></span>
Why do you think this feature is something we should consider for this plugin?
We should avoid as many false positives as we can and make our rules the best ruleset for WordPress. 🙂