question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 :afters. Maybe something in the function being called?

https://github.com/dequelabs/axe-core/blob/f2f15377c917d0b6fc27d2181f64ebef26e5a9b0/lib/checks/color/color-contrast-evaluate.js#L103-L116

Anyhow, here’s also a screenshot showing the run through using the Chrome plugin and the result: Screen Shot 2021-01-26 at 14 25 39 PM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
strakercommented, Jun 23, 2021

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.

2reactions
strakercommented, Jun 17, 2021

@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 and visibility of the element, if it’s none or hidden (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 it ignorePseudo to match the other options we have, and set it to default to false.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found