Let’s get the controversial take out of the way first:
Shipping a site in 2022 that forces light mode (or forces dark mode) and has no way to respect prefers-color-scheme is quietly ableist.
Why dark mode actually belongs in the accessibility conversation
Vestibular disorders & migraine triggers High-contrast white backgrounds are literal triggers for thousands of people. The WebAIM survey keeps showing year after year that a painful percentage of respondents with migraines or vestibular issues switch to dark mode immediately.
Photophobia & low-vision conditions Many forms of low vision (cataracts, diabetic retinopathy, etc.) are dramatically improved by dark backgrounds with light text. The inverse — light background with dark text — can cause halation and glare that makes reading impossible.
Situational impairment Someone on a phone outside in bright sunlight needs light mode. Someone in a dark bedroom at 2 a.m. needs dark mode. That’s not a preference; that’s the environment disabling them if you ignore it.
Some sane defaults in 2022
That’s it. Respect the OS setting out of the box. No extra JavaScript, no localStorage bloat, no “please pick your preference” modal on first visit.
If you add a toggle, follow the unbreakable rule
Give three — and exactly three — options:
Light
Dark
System (default)
Never, ever remove the ability to go back to system. Forcing someone into a choice they made six months ago when their environment or eyesight has changed is cruel.
I’ve seen too many sites proudly announce “we now have dark mode!” and then default to light with a tiny moon icon that stores the override forever. That’s not accessibility — that’s a preference trap.
My current setup (and the one I sleep soundly with)
A tiny Alpine/Tailwind toggle in the corner:
Click once → dark Click again → light Click again → back to system
No one gets stuck. Everyone wins.
Dark mode stopped being a “cool trend” sometime around 2020. Now it’s just basic decency.
Do the bare minimum: respect prefers-color-scheme. Do the decent thing: give people an escape hatch back to system if you let them override it.
Your retinas (and a bunch of strangers you’ll never meet) will thank you.