WCAG AA (tiêu chuẩn khuyến nghị): text thường cần tỷ lệ contrast tối thiểu 4.5:1, text lớn (18px+ hoặc 14px+ bold) cần 3:1. WCAG AAA: 7:1 và 4.5:1. Contrast ratio tính giữa màu text và màu nền.
Ví dụ: chữ xám nhạt #999 trên nền trắng chỉ đạt ~2.85:1 — fail AA. Tools kiểm tra: Lighthouse DevTools, WebAIM Contrast Checker, axe DevTools extension.
Lưu ý: không dùng màu là cách duy nhất truyền thông tin (ví dụ: chỉ dùng màu đỏ/xanh cho lỗi/thành công).
WCAG AA (recommended standard): regular text needs a minimum contrast ratio of 4.5:1; large text (18px+ or 14px+ bold) needs 3:1. WCAG AAA: 7:1 and 4.5:1. Contrast ratio is calculated between text color and background.
Example: light gray #999 on white is only ~2.85:1 — fails AA. Tools: Lighthouse DevTools, WebAIM Contrast Checker, axe DevTools.
Note: don't use color as the only way to convey information (e.g., only red/green for error/success).