Does a drop shadow in a dark (and passing color) count as accessible when the background color does not?


  • Light blue background and white text = not accessible
  • Light blue background with white text and dark blue shadow = accessible?

1 Answer 1


Yes, it does

from W3C Techniques for WCAG2

If the background or the letters vary in relative luminance (or are patterned) then the background around the letters can be chosen or shaded so that the letters maintain a 4.5:1 contrast ratio with the background behind them even if they do not have that contrast ratio with the entire background.

  • 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) Feb 18, 2019 at 23:41
  • @devin - I know that technically it will improve the contrast of the foreground but is it recommended? Like slugolicious mentioned, the shadow would need to go all the way around the text. I tried doing that and it definitely makes the text more readable but doesn't look quite right. Feb 19, 2019 at 5:37
  • how it looks is subjective and will depend on the OP taste, and WCAG has that specific guideline for that question. Whether the OP chooses to use it or not is another story :)
    – Devin
    Feb 19, 2019 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.