So I'm trying to apply text-shadow to white large text over a gradient background in order to meet the WCAG AA contrast ratio requirements. I am following procedure of checking the gradient where contrast is lowest. The foreground is #e1dee6 while the text is white. On its own it does not meet the requirements so I am adding a text-shadow of #7f7e83 which brings the ratio at 3:1 which is acceptable, however the text does not look well with the shadow on all four sides so I'm wondering if two sides are accepted as you can see in the attached image:
The bottom and right are ok but the left and top come at about 1.45:1. Is two sides ok or all 4 sides of the text need to meet the WCAG AA requirements ?
UPDATE:
I found another related question on stackexchange and according to the comments, quoting slugolicios here:
"just make sure the drop shadow goes all the way around the letter (more of an outline than a shadow). if the shadow is only on 2 sides, then it will still fail on the sides that don't have a shadow and will be an overall failure (even though two sides conformed)"
https://ux.stackexchange.com/questions/123863/do-drop-shadows-count-for-accessibility
Until there is official mentioning that text-shadow on 2 sides is enough to pass the WCAG, I'll have to take this advice.
` with and without shadow alternatives, squint your eyes and see what happens. Yep, doing it the budget way....
– Rene van der Lende Sep 15 '20 at 13:50