You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.
I think we've hit a bug similar to the ones in #19 and #9 - I'm creating a separate issue because I think there may be a slight difference in specificities.
I took a dive into the code itself, and for us I think the issue is how the contrast between foreground and background is calculated. Our example differs from the two referenced in that there's no funny business with pseudo-classes or odd placements - just a transparent backgruond.
In our example, both foreground and background have very dark colours, but the background colour has very low opacity (10%). This allows the much whiter background to shine through in the finally rendered image. For an end user, there isn't an issue with contrast.
The current code correctly identifies the opacity of the background, but doesn't actually use it when trying to figure out the final contrast.
I've been mulling over how to solve the issue. You'd probably need to identify that the background is not opaque (alpha < 1) and then blend the background colour downwards into parent elements until you hit an opaque background color. I fear this required might changes in @qualweb/qw-element as well as this repo, so I've held off on trying out any solutions (hacking on the code across 3+ repos is quite cumbersome :-X )
The text was updated successfully, but these errors were encountered:
Hey guys,
I think we've hit a bug similar to the ones in #19 and #9 - I'm creating a separate issue because I think there may be a slight difference in specificities.
Our example: https://www.brs.dk/da/borger/om-redningsberedskabet-i-danmark/redningsberedskabet-i-danmark/det-kommunale-redningsberedskab/beskyttelsesrum-og-sikringsrum/
I took a dive into the code itself, and for us I think the issue is how the contrast between foreground and background is calculated. Our example differs from the two referenced in that there's no funny business with pseudo-classes or odd placements - just a transparent backgruond.
In our example, both foreground and background have very dark colours, but the background colour has very low opacity (10%). This allows the much whiter background to shine through in the finally rendered image. For an end user, there isn't an issue with contrast.
The current code correctly identifies the opacity of the background, but doesn't actually use it when trying to figure out the final contrast.
I've been mulling over how to solve the issue. You'd probably need to identify that the background is not opaque (alpha < 1) and then blend the background colour downwards into parent elements until you hit an opaque background color. I fear this required might changes in @qualweb/qw-element as well as this repo, so I've held off on trying out any solutions (hacking on the code across 3+ repos is quite cumbersome :-X )
The text was updated successfully, but these errors were encountered: