Pseudo element contrast failure too invasive?
See original GitHub issue👋
I’ve run into a situation where :nth-child
style pseudo selectors are wrongly being identified as pseudo elements and therefore, can’t assume contrast acceptance. I’ve tracked down to this section here, but it does seem to only be checking for :before
and :after
s. Maybe something in the function being called?
Anyhow, here’s also a screenshot showing the run through using the Chrome plugin and the result:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:20 (9 by maintainers)
Top Results From Across the Web
F87: Failure of Success Criterion 1.3.1 due to inserting non ...
1 due to inserting non-decorative content by using ::before and ::after pseudo-elements and the 'content' property in CSS. About this Technique. This technique ......
Read more >Side Effects of Radiographic Contrast Media - Hindawi
They may have side effects ranging from itching to a life-threatening emergency, known as contrast-induced nephropathy (CIN). We define CIN as acute renal ......
Read more >The management of BCG failure in non-muscle-invasive ...
Up to 40% of patients with non-muscle-invasive bladder cancer (NMIBC) will fail intravesical bacillus Calmette-Guérin (BCG) therapy.
Read more >Accessibility rule: Elements must have sufficient color contrast
According to WCAG 2 AAA contrast ratio thresholds, all text elements must have sufficient contrast between foreground text and background colors.
Read more >Myelogram | Mayfield Brain & Spine, Cincinnati, Ohio
A myelogram is an invasive diagnostic test that uses x-rays to examine the ... The dye (contrast agent) used in a myelogram shows...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. We added the option and it should be available in the next feature release (coming in the next few weeks hopefully). Do note though that turning off the option may result in a Needs Review item being marked as a failure, so you’ll need to watch out to see what it will change for your tests.
@craigkovatch the UI changes wouldn’t affect the js library. We’ll add an option to disable the pseudo check of color-contrast so you can turn off these warnings if you want.
@clottman for this one, let’s check in the pseudo algorithm the
display
andvisibility
of the element, if it’snone
orhidden
(respectively) we shouldn’t flag it as having a pseudo element. Additionally, let’s add an option to disable the pseudo check entirely. Let’s call itignorePseudo
to match the other options we have, and set it to default tofalse
.