Closed Bug 402356 Opened 17 years ago Closed 17 years ago

netError (and others) use hard-coded colors for warnings

Categories

(Core Graveyard :: Security: UI, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta5

People

(Reporter: johnath, Assigned: takenspc)

References

Details

(Keywords: access)

Attachments

(4 files, 6 obsolete files)

As part of his review of bug 401575, bz pointed out that netError.css (in both pinstripe and winstripe themes) uses hardcoded colours in cases where it should probably be using system colours. Specifically, the "securityOverrideContent" styles use a light yellow as a warning colour, hardcoded to #FFF090". In attempting to find a system colour to use instead, I found that both the notification bar styling for warnings and the error console styling for warnings in the log use hardcoded values, each different though all approximately "pale yellow." This seems like it could have accessibility repercussions, though in the netError case specifically, the background colour does not communicate any additional information directly (i.e. it is not necessary to notice the colour in order to properly use the page.)
Flags: blocking1.9?
It's not about whether the background color communicates information. It's about the fact that the relevant style are: 112 #securityOverrideContent { 113 background-color: #FFF090; /* Pale yellow */ and 14 body { 17 color: -moz-FieldText; (this is in the winstripe version of netError.css). Now there's no guarantee that that foreground color is different from #FFF090, since it's just a system color that depends on the OS theme. So it's possible for all the text inside #securityOverrideContent to be invisible. Setting just one of background and foreground without setting the other is just generally a bad idea...
+'ing. P3.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P4
A screenshot on the Linux/GTK2 (Nodoka-Midnight theme) which shows the problem. I can hardly read it.
A workaround patch which sets the foreground color of |#securityOverrideContent| to black.
Attached image Screenshot with patch (obsolete) —
color: "black"; ?
Oops! A workaround patch fixes that typo.
Attachment #299379 - Attachment is obsolete: true
Patch for netError.css (winstripe/gnomestripe). # notificationbar uses the combination of InfoBackground/Infotext too.
Attachment #299380 - Attachment is obsolete: true
Attachment #299741 - Attachment is obsolete: true
Attachment #303998 - Flags: review?(gavin.sharp)
Attached image Screenshot with patch
Attached image screenshot with patch (normal theme) (obsolete) —
Maybe it's just my monitor, or viewing angle, but I can hardly tell the difference between InfoBackground and white, unless I look very closely.
Cropped out too much of the background color in the previous screenshot, makes it look strange.
Attachment #305060 - Attachment is obsolete: true
Attachment #305062 - Flags: ui-review?(beltzner)
Comment on attachment 303998 [details] [diff] [review] Patch for netError.css (winstripe/gnomestripe) r=me on this, assuming beltzner is OK with the less differentiable color.
Attachment #303998 - Flags: review?(gavin.sharp) → review+
Another option would be to keep #FFF090 as the background, and hard-code a black foreground. Means it might look weird with strange native themes, but will guarantee that it will always be legible (for people that can read black-on-yellowish, granted - pretty sure that's a large majority of our users :).
Attached patch Patch for netError.css #2 (obsolete) — Splinter Review
> I can hardly tell the difference between InfoBackground and white, unless I look very closely. I added another border. It helps emphasizing |InfoBackground|
Attached image Screenshot with patch #2 (obsolete) —
Assignee: kengert → taken.spc
Flags: tracking1.9+ → blocking1.9+
Priority: P4 → P2
Comment on attachment 305062 [details] screenshot with patch (normal theme) uir=beltzner
Attachment #305062 - Flags: ui-review?(beltzner) → ui-review+
Comment on attachment 303998 [details] [diff] [review] Patch for netError.css (winstripe/gnomestripe) This is a blocker, so no approval1.9 is required.
Attachment #303998 - Flags: approval1.9?
Comment on attachment 305158 [details] Screenshot with patch #2 beltzner: which screenshot of the two do you like the best?
Attachment #305158 - Flags: ui-review?(beltzner)
I'm going to sit on this one before landing it, just until beltzner has looked at the second screenshot and picked which one he likes better.
Status: NEW → ASSIGNED
Keywords: checkin-needed
ThreeDShadow for the inner box looks cluttered. There should be no border or maybe ThreeDLightShadow, imho.
Keywords: checkin-needed
Let's just land the reviewed patch.
Keywords: checkin-needed
Attachment #305158 - Attachment is obsolete: true
Attachment #305158 - Flags: ui-review?(beltzner)
Attachment #305157 - Attachment is obsolete: true
mozilla/toolkit/themes/winstripe/global/netError.css 1.9 mozilla/toolkit/themes/gnomestripe/global/netError.css 1.4
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: