Accessible CSS ensures interfaces remain perceivable and operable across visual, motor, and cognitive differences.
CSS accessibility essentials
- Visible focus indicators.
- Adequate contrast and scalable text.
- Respect
prefers-reduced-motion. - Avoid color-only state communication.
A11y warning
outline: none without replacement is one of the most common accessibility regressions.
Important interview questions and answers
- Q: Fastest manual a11y CSS test?
A: Keyboard tab through controls and verify visible focus at 200% zoom. - Q: Why handle reduced motion in CSS?
A: Some users are motion-sensitive; respecting preference improves comfort and safety. - Q: Contrast-only concern for text?
A: No, controls/icons/states also need sufficient distinguishability.
Pitfall: Check cascade order—author stylesheet loses to inline styles and !important surprises.