Tailwind CSS
/Beginner
Color Contrast
Definition
The practice of selecting text and background color combinations in Tailwind that meet the WCAG contrast ratio requirements for visual legibility.
Explain Like I'm New
Putting light gray text on a white background might look 'aesthetic' and minimalist, but someone with visual impairments physically cannot read it. You must ensure sufficient contrast.
Real World Example
Checking if `text-gray-400` on a `bg-white` card passes accessibility tests. (Spoiler: It fails terribly. You must use at least `text-gray-500` or `text-gray-600`).
Common Use Cases
- •WCAG Compliance
- •UI Design
Interactive Example
Interview Questions
basic
- Is `text-gray-300` on a `bg-white` background considered accessible?
intermediate
- If you put `text-white` inside a `bg-yellow-400` warning banner, why might users complain?