Disabled checkboxes appear the same as regular checkboxes in high contrast mode
Categories
(Firefox :: Theme, defect, P3)
Tracking
()
People
(Reporter: alex-mozbugs, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: access, polish, Whiteboard: tpi:+)
Attachments
(6 files)
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Reporter | ||
Comment 3•14 years ago
|
||
Updated•14 years ago
|
Comment 4•14 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Updated•8 years ago
|
Comment 6•8 years ago
|
||
Updated•8 years ago
|
Reporter | ||
Comment 8•3 years ago
|
||
This actually appears to have been resolved, at least on Windows 10 with Firefox 89. The disabled checkbox is green as I'd expect for disabled controls.
Comment 9•3 years ago
|
||
Comment 10•3 years ago
|
||
Comment on attachment 9236450 [details]
Same issue on MacOS 11.4
Seeing the same issue on MacOS 11.4 - note that the checkbox is checked, but does not appear any differently.
Updated•2 years ago
|
Comment 12•6 months ago
|
||
The unchecked state is improved for differentiating between disabled or not, but I think it's difficult to tell that the checked state is actually checked still. Perhaps the check mark should still be visible?
Comment 13•6 months ago
|
||
Yeah, so we're painting the checkbox, it's just that we paint it the same color as the background / border when in high-contrast:
- https://searchfox.org/mozilla-central/rev/a18a7c526cf3c531f2fc24db4f0dffbc16290a7e/widget/Theme.cpp#262
- https://searchfox.org/mozilla-central/rev/a18a7c526cf3c531f2fc24db4f0dffbc16290a7e/widget/Theme.cpp#228-232
Maybe we should use that semi-transparent checkbox color even in not high-contrast, something like this:
diff --git a/widget/Theme.cpp b/widget/Theme.cpp
index 1fef1e2d6b552..92a3dc22c09b1 100644
--- a/widget/Theme.cpp
+++ b/widget/Theme.cpp
@@ -226,9 +226,7 @@ std::tuple<sRGBColor, sRGBColor, sRGBColor> Theme::ComputeCheckboxColors(
if (isChecked || isIndeterminate) {
if (isDisabled) {
auto bg = ComputeBorderColor(aState, aColors, OutlineCoversBorder::No);
- auto fg = aColors.HighContrast()
- ? aColors.System(StyleSystemColor::Graytext)
- : sRGBColor::White(aColors.IsDark() ? .4f : .8f);
+ auto fg = sRGBColor::White(aColors.IsDark() ? .4f : .8f);
return std::make_tuple(bg, bg, fg);
}
I don't have the time right now to test it but if someone does and submits it I'd happily r+ it. Can't be worse than zero-contrast...
Updated•6 months ago
|
Description
•