When I read large chunks of text, I tend to select portions of it—paragraphs, lines—as a reading aid. I don’t imagine I’m alone in this. So why do people, using flat colour images as a background, forget to set a background colour that reflects the image colour?

Two examples—picked because I read them, not because of their prominence or otherwise—are Snook and Binary Bonsai. These are two good-looking sites, designed by people who really know what they’re doing. And yet, when I try to select some text on either of them, this is what I see:

Near-invisible selected text on Snook

And here’s what I ought to see:

Visible selected text on Snook

Bear in mind that this was done with one simple style rule; implementing it across the whole site would be more complex, but not very. Jonathan knows what he’s doing—this is just a simple mistake, very easy to make. However, it has a real impact on the site’s usability, making it harder to read even for people who are in no way visually impaired. Over at Binary Bonsai, we find the same story:

Near-invisible selected text on Binary Bonsai

How it ought to look:

Near-invisible selected text on Binary Bonsai

Reading and writing is what we’re all here to do, and we have to strive to make it easy. There may be plenty of people who don’t read in this fashion, but there are enough people who do to make it worth the five minutes or so it takes to fix the issue. We’re always talking about web standards and accessibility; this is a real example of something important we should all be ensuring we don’t forget.

Update, 2.11.05

From the comments it looks like this isn’t a problem on OS X (both in Safari and Firefox), which raises the question of why that might be. So far I’ve tested this effect in Firefox on Windows XP, which does have the problem, and Opera (again on XP), which doesn’t. Since Jonathan’s now fixed this on his site, and Internet Explorer really doesn’t like Binary Bonsai, I’m slightly at a loss as to how to test this further.

If you’re running Firefox on XP, please check out the dark version of ‘Invader’ on Binary Bonsai, and let me know if you experience the problem I detailed above. Even if this is only restricted to Firefox on XP, I would stand by my above points—when I last checked, people with that browser and OS configuration accounted for 60% of my visitors.