Recent chats
ASKGEEZ Q&A GUIDETechnology & devices

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]

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

How should I review my website when someone changes their browser’s text and background colors? I’m especially concerned about buttons, fields, and status messages.

Geez

Treat the override as a real presentation to test, not as an unusual edge case. Browser color settings can replace colors chosen by the page, and color changes can also remove visual grouping that your design relied on. [S1] Start by changing the browser’s foreground and background colors, then go through the same screens and interactions a visitor would use. [S1]

For each control, ask: Can I tell what it is? Can I read its label? Can I tell whether it is focused, selected, unavailable, or reporting an error? A control may be identified by a visible label or a sufficiently contrasting icon even if its boundary is not visible; focus still needs a sufficiently contrasting indicator. [S3] Don’t assume that the authored colors remain in effect during this review.

Follow-up question

What should I look for on a form? For example, imagine a sign-up form with a colored submit button, outlined fields, and a red error message.

Geez

Use that form as a checklist of distinct cues. For the submit button, confirm that its label still identifies it even if its colored fill disappears. For each field, check that the field and its label remain distinguishable from nearby content; a layout cue or border can help preserve structure when color changes. [S2] For the error, verify that its text is still legible and that the issue is communicated by words, not just the red color. That last point is a practical review suggestion: the cited guidance does not prescribe how a particular form must phrase errors.

Then move keyboard focus through the form and check each focused control. Focus must remain visibly identifiable with sufficient contrast. [S3] If an error, required state, or selected state is conveyed by a color change, check that state separately rather than assuming the normal control appearance proves it will be clear.

Follow-up question

Can I leave text colors unset and keep my layout and borders? And should I expect the same result in every browser?

Geez

For CSS pages, one documented approach is to specify layout and borders while leaving text and text-background colors unspecified, allowing browser or operating-system settings to provide them. [S2] It is an example to consider, not a required implementation or a guarantee that every design will behave well. W3C also cautions that a technique that leaves colors to users may not suit layouts whose backgrounds carry important structure. [S1]

Check your actual page in the browsers that matter to your audience. Browser behavior varies: for example, pop-ups can become transparent or menus can render differently when colors are overridden. [S2] The cited guidance does not establish identical results across browsers or cover every browser, operating system, widget, or override setting. If a particular menu or pop-up loses its structure, revise that component and retest it in that presentation.

Follow-up question

Could you give me a repeatable review I can use during a design or release check?

Geez

Yes. Use this short pass on each important page, recording the browser and override setting so someone else can repeat the check. For every interactive component, inspect its normal appearance, keyboard focus, and any state that changes what a user should do. Pay particular attention to controls whose identity, grouping, or status currently depends on a colored background. The W3C guidance specifically calls for checking the page with user-selected foreground and background colors in effect. [S1]

If a boundary or state indicator carries visual information needed to identify a component or its state, check its contrast against adjacent colors; WCAG 2.2’s non-text contrast criterion gives a 3:1 minimum for that information, subject to exceptions. [S3] This does not mean every border must be visible: a clear label or sufficiently contrasting icon may identify a control without one. [S3] Record failures as observations, such as “focus indicator disappears on the search button,” then retest after a change. This review is a practical check, not proof that every user-agent presentation will match.

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.

  1. [S1] W3C Technique G156: Support user-selected foreground and background colors
    w3.org · Checked
  2. [S2] W3C Technique C25: Preserve layout with borders while leaving text colors to users
    w3.org · Checked
  3. [S3] W3C Understanding WCAG 2.2 SC 1.4.11: Non-text Contrast
    w3.org · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work