Commit 3f2c47a
Fix: narrow cover block selector exclusion to specific decorative classes
The broad [class*="wp-block-cover"] substring match excluded ANY element
whose class contained that string — including the outer .wp-block-cover
container and .wp-block-cover__inner-container, which hold real user
content. If aria-hidden="true" were incorrectly placed on either, the
checker would silently miss it.
WordPress core only places aria-hidden="true" on two specific decorative
child elements: .wp-block-cover__background (colour overlay) and
.wp-block-cover__image-background (background image). Use those exact
classes in the selector instead.
Also adds a comment documenting each exclusion, and replaces the false-
negative passing test for the outer container with a correct failing test.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c442c9f commit 3f2c47a
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
| |||
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
0 commit comments