How can I make a website work when users override text colors?
Quick answer
Test your page with browser foreground and background colors changed, then inspect every interactive control and message in that presentation. Make sure text remains readable, controls can still be identified by their labels or visible boundaries, and focus and selected, disabled, or error states remain discernible. Avoid relying only on authored color fills to group or explain content; use layout and borders where helpful, and check the actual browsers you support because behavior can vary. [S1] [S2] [S3]
The question, the details, the next step.
A practical checklist
Change browser foreground and background colors, then inspect the page. [S1]
Check that each control can be identified by its label, icon, or needed boundary.
Inspect keyboard focus and confirm its indicator remains visible and sufficiently contrasting. [S3]
Check selected, disabled, required, and error states without relying on color alone.
Review layout cues, borders, menus, and pop-ups in the browsers you support; behavior can vary. [S2]
Record the browser, override setting, component, and observed problem; retest after changes.
A few more useful answers
Does every control need a visible border when colors are overridden?
Not necessarily. A visible label or sufficiently contrasting icon can identify a control without a visible boundary, but any visual information needed to identify the control or its state should remain discernible. [S3]
Does leaving text colors unspecified guarantee that user colors will work?
No. It is a documented CSS approach, not a guarantee, and browser behavior can vary. Test the actual page and its menus or pop-ups in browsers that support color overrides. [S2]
What contrast should I check for component boundaries and state indicators?
For visual information needed to identify a component or its state, WCAG 2.2 specifies at least 3:1 contrast against adjacent colors, subject to exceptions. [S3]
Sources
References used for this guide.
