Okay, I think I see what’s going on.
You have white text on green gradients in a few places: in the header, and in the “Discover Biodiversity” footer, and maybe other subtle gradients in other places.
The Accessibility panel in Firefox DevTools is great at finding out contrast ranges for text on background images and gradients, and works by screenshotting the text node with the text made invisible, and comparing the text color to each pixel in that screenshot. This can lead to some false positives if you have a couple pixels near to some letters that are statistical outliers (much darker/lighter than the rest of the background). But usually it’s a fair representation of the actual contrast of this text on top of that background-image or gradient background.
So the Accessibility inspector will show a range like 3.57—4.12 (the whole range fails the 4.5 requirement) or 4.13—5.10 (part of the range fails the 4.5 requirement).
If you’ve found instances where the Accessibility inspector shows one result, and the Inspector’s color picker shows a different result, do tell, because they should be identical. I haven’t found one yet, but there are situations where you can have different results because you actually are getting a different display:
- If you use the accessibility inspector’s “Picker” mode and hover a text node in the header, you will probably get your “hover” style which adds a lighter radial gradient below the hovered element. So your contrast range will be lower (in the 2-3 range).
- If you select this text node in the Inspector, and use the color picker when editing a
color property in the Rules tab for instance, you don’t have a “hover” style displayed so your contrast range will be higher (in the 3-4 range).
Finally, why is Lighthouse passing here? Well, Lighthouse’s contrast check is more primitive and only checks CSS values, not the actual rendering. It works for text on top of solid colors (background-color), but usually not for text on top of background images, gradients, or text with a transparent background that is absolutely positioned on top of a different element (that is not its ancestor, e.g. a sibling). Not 100% sure what algorithm Lighthouse uses, I think they may be using the aXe engine (same results as the aXe extension, which is good and useful by the way).
Basically, Lighthouse/aXe will not detect some contrast issues that should not pass.
Firefox’s Accessibility inspector as its limits too (e.g. when you use some specific CSS filters or text with strokes or “gradient text” effects), but detects more issues.