'Google Chrome Lighthouse - Possibility to ignore contrast ratio check on specific elements

Currently i search a way of telling chrome lighthouse inspection to ignore contrast ratio check for some elements. I've not found any way to declare something to tell lighthouse that this is not a readable text.

I have material icons, that use text to display icons, that are just used for aesthetic reasons. It simply don't need high contrast as it may disturb the users view too much (I think).

I've tried using different html tags instead of i, but it is always detected by lighthouse.

Let's see this example of where i think that the contrast ratio check can be ignored, as it is just a small design thing. Maybe i am thinking wrong and some UX designer may argue differently. I am open for suggestions.

lighthouse contrast ratio issue



Solution 1:[1]

I don't know if your question still stands, but a way to bypass the contrast flag is to set the color to a gradient. I just do the same color for 0% and 100%, and the text/background/color etc... looks the same, but Lighthouse doesn't check it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zoltan Sepsi