Comment 43 for bug 27867

Revision history for this message
In , Florent (florent) wrote :

Commenting on this bug since there is a lot of people saying “they should do X” or “this requires Y” with apparently no knowledge of what is happening.

Attention people:
THIS PROBABLY CANNOT BE FIXED, EVER.

What’s happening with this option (browser.display.use_document_colors=false) is that the browser ignores web page style (CSS) declarations for:

- text color
- background color
- border color
- background images

The problematic part here is background images. Let’s say a website uses a dark background image (it could be a photograph, a gradient, a repeated pattern, etc.), and declares `color: white` for the text. If we display the background image but ignore the white color, and the user’s default color for text is black, we end up with black text on a black background. The user can’t read. If we keep a light background image, but the user has set their default text color to white or something similarly bright, we end up with light text on a light background and poor or no readability.

So Firefox disables background images because there is no other obvious way to make sure that text can be read if it keeps background images.

Now, what happens on many sites is that web designers and developers have used background images to represent actual content, rather than decorative backgrounds. Especially (but not exclusively) with one questionable and inaccessible webdesign technique called CSS Sprites. Some sites use background images to represent the content of most navigation items and buttons. This is a misuse of the HTML and CSS standards, but it’s still a fairly common (bad) practice. When background images are disabled, those navigation items and buttons just disappear (thought technically they’re still here and can be clicked—they’re just transparent).

Keeping background images is not a solution since it would result in unreadable text, that would nullify the purpose of the “Always use my colors” option.

Possible solutions are:

1. Make every website that uses background images for content change their site. Sadly there will always be websites that do not follow accessibility best practices.

2. Build a brand new solution for a custom color and/or high contrast mode, that analyzes background images and tries to determine programmatically if they should be discarded or kept around.

I don’t see Mozilla committing weeks of developer time to design, build, test and ship a new high contrast mode that can deal fairly well with CSS Sprites and backgrounds-that-shouldn’t-be-backgrounds, unless there’s a strong demand for it. Of course anyone with strong CSS and (for instance) JavaScript knowledge is welcome to try something like this and build a proof-of-concept.