I'm not sure, whether this is garland-specific.

Anyway, when you set the "color" of an input field, please also set it's "background-color" (and vice versa). Otherwise the background color of the input (and select) fields is set by the web browser to a color which is usually OS theme-specific. Using an OS theme where the input controls are painted dark or black, black text in them remains invisible. I'm even writing this bug report into drupal.org practically blindfoldedly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jotik’s picture

Version: 5.6 » 6.0

Changed version: 5.6 -> 6.0. Issue still occurs.

jotik’s picture

Status: Active » Needs review
FileSize
409 bytes

Here's a trivial patch to fix this in the Garland theme and probably avoid some W3C CSS validation warnings about this issue. Anybody alive?

jotik’s picture

Version: 6.0 » 6.2

Still occurs in Drupal 6.2.

Rowanw’s picture

Title: Invisible text in input fields » Input fields: avoid clashes with system colors
Version: 6.2 » 6.x-dev

It took me a while to realize what the problem was, but it's definitely a legitimate issue. When you set the foreground color of an element the background color should be specified at the same time, you can't guarantee that the background will always stay the same color across all devices and systems.

I haven't tested this patch but it looks good. Mental, can you make sure all the other core themes get the same treatment?

jotik’s picture

FileSize
896 bytes

Ok, this will do for the Chameleon and Garland (and Minnelli?) themes on the screen. However, Garland also has a print.css for print media, and I can't promise that it will work properly for printing. Analyzing and rewriting the whole theme - I don't have the time. Where are your theme developers?

Some more remarks - Garland was the only theme always using custom input field colors. Chameleon only coloured the erronous input fields, which still produced this issue, so I changed it to handle all the input fields. The other themes don't specify custom colours for the input fields and therefore these just look ugly when using some dark-coloured system colour schemes, but they are still readable.

Rowanw’s picture

Title: Input fields: avoid clashes with system colors » Themes: avoid clashes with system colors
FileSize
1.9 KB

I noticed that the Chameleon theme didn't have a background or foreground color on the body element, which is a big problem (the whole page changes color). I've created a new patch for this.

I also found a nice dark Ubuntu theme that I've decided to keep, however as Mental already pointed out, the d.org theme becomes much harder to use (I'm using a custom Human theme).

aclight’s picture

Version: 6.x-dev » 7.x-dev

AFAIK this is still a problem in head

jotik’s picture

Yes, the speed of fixing bugs at drupal.org is amazing. Whats the hold-up?

**discontent**

floretan’s picture

1 hunk failed.

CSS comments is not well-formatted (edit: all of chameleon's css files seem to have a non-standard formatting).

Changing the border of input fields in chameleon has nothing to do with this issue.

cburschka’s picture

Status: Needs review » Needs work

Thank you so much for this one - I've had no end of trouble when using user themes in Firefox that switched the colors.

Please fix this comment

+
+/*
+** Input controls
+*/

Should be

+
+/*
+ * Input controls
+ */
mgifford’s picture

cburschka’s picture

I think you forgot to diff the other themes in this one.

mgifford’s picture

Status: Needs work » Needs review
Issue tags: +Usability

Isn't Garland the only official theme in D7 these days? Was for a moment in anycase. Well that and stark.

Let me know though.

cburschka’s picture

Status: Needs review » Reviewed & tested by the community

You are right. I got confused because my checkout of HEAD still had all the old themes, but it turns out my checkout command lacked the -P parameter to prune empty folders (CVS has these quirks). Yep, they're all gone, so this is RTBC.

webchick’s picture

Cool, seems simple enough.

Committed to HEAD. Thanks! Marking down to 6.x for consideration. Needs to be ported so that it includes chameleon, etc. It's possible that one of the earlier patches is already ready to go, but someone needs to test it and mark RTBC.

@jotik, the hold-up is that in order for a bug to get fixed, it needs to a) be fixed in the latest version of Drupal and then back-ported, b) be reviewed by at least one or two people and marked "reviewed and tested by the community." This didn't happen until April 10, 2009, which explains the hold-up.

#drupal on IRC is a great place to trade patch reviews with others, make friends, and learn a whole lot. Hope you take that approach next time instead of getting frustrated. :)

webchick’s picture

Version: 7.x-dev » 6.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Ahem. :P Moving down to 6.x for consideration. :P

webchick’s picture

Version: 6.x-dev » 7.x-dev
Status: Patch (to be ported) » Needs work

Eh. Actually. I didn't initially see this, but this patch has the annoying effect of making all the input buttons white as boxes well, which is very jarring. So I've rolled this back for now, because we should figure out something else here.

Before
After

FF3 Mac fwiw.

Bojhan’s picture

Issue tags: -Usability

Doesn't seem like a usability issue.

cburschka’s picture

That looks very tricky to solve.

I believe the nice smooth button style is a browser default (Firefox; possibly only in Linux and Mac but I'm not sure), and the background color directive overrides this default.

The only way to comply with accessibility and keep the rounded buttons may be to go the other way: Don't specify a foreground color at all. This would turn the #494949 text in select and textfields black instead of dark gray, which may look ugly too (haven't tried it out).

Edit: Or Mac, I guess. I don't remember seeing it in Windows, but it's been a while.

cburschka’s picture

Here:

http://stuff.ermarian.net/arancaytar/images/drupal/background-before.png
http://stuff.ermarian.net/arancaytar/images/drupal/background-after.png

The difference between off-black and black is very subtle, but it's there if you look for it - and I predict criticism.

Rowanw’s picture

Isn't it really just textareas and textfields that need to have colors applied? They're simpler than other UI elements, yet they can be the most jarring when they don't match the website's template.

When a button has a gradient and rounded corners it tends to fit in with almost any context, so I'd argue that buttons and drop downs should forego color and background-color to stay consistent with the OS theme. Text fields, on the other hand, would need color, background-color and border just to be sure.

mgifford’s picture

Ok, so the patch in comment 11 is no longer in core for what it's worth.

Seems that by altering the form that FF breaks the nicely formatted buttons and goes with the clunky old school ones.

Could completely theme all buttons so that they fit a Drupal look/feel.

It's the same problem as the one defined here - http://drupal.org/node/418306#comment-1475908

Everett Zufelt’s picture

Issue tags: +undefined

tagging

Everett Zufelt’s picture

Issue tags: -undefined +Accessibility

Tagging again

mgifford’s picture

Status: Needs work » Postponed

I'm marking this as postponed as it seems to be dependent on the browser. I don't have any real docs on this and I think it's a browser bug that's not well documented.

In an article by 456 Berea Street - Incomplete colors for text input fields they warn people to define neither or both the font color and background color.

We might need to move this to won't fix if there isn't a better way around this.

mgifford’s picture

Status: Postponed » Closed (won't fix)

Doesn't seem to be a good way around this issue for now.

jotik’s picture

If there's no "good" way to fix it, it should not be fixed? I can't believe you guys! Fixing this means like a only adding a few lines of CSS which will not break anything! The way of handling this bug has been amazing!

Although this bug is not the only reason for it, this was the last drop into the chalice. The next CMS for me will not be Drupal. Bye.

mgifford’s picture

Status: Closed (won't fix) » Active

Ok, that's fine. Please submit a patch. This issue has seen no movement for 10 months & it didn't seem like it was a resolvable issue.

Everett Zufelt’s picture

Version: 7.x-dev » 8.x-dev

I'm tempted to close: won't fix this issue. But, let'sss move it to 8.x-dev in case some good solution is found.

The OS (or UA) is changing the background colour, it should be responsible for changing the foreground colour as well. If there was a good way to fix this, without causing other visual problems, then I would be in support of fixing in D7.

Retheming all buttons / form input controls is simply not possible for D7, but can be revisited in D8.

mgifford’s picture

@jotik - I'd recommend making possible improvements with the accessibility in Drupal 7 with the Accessible Helper Module. Perhaps there's a way to work out this issue within this space so that it is tested & ready for D8.

amateescu’s picture

Status: Active » Closed (won't fix)

The Garland theme has been removed from D8: #911054: Remove Garland from Core

mgifford’s picture

Project: Drupal core » Garland
Version: 8.x-dev » 8.x-1.x-dev
Component: Garland theme » Code
Status: Closed (won't fix) » Active

Yup. But it's still an active problem with the code. I've just moved it to the contrib project.