Adjust color-mix for secondary text to better align with design spec
Categories
(Firefox :: Firefox View, defect, P3)
Tracking
()
People
(Reporter: jberman, Assigned: kcochrane, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: access, blocked-ux, Whiteboard: [fidefe-2022-mr1-firefox-view] [Interface] )
Attachments
(4 files)
Actual
Secondary text color = color-mix(in srgb, currentColor 80%, transparent)
Expected
Secondary text color = color-mix(in srgb, currentColor 60%, transparent)
This should be applied on new tab page and on Fx View for consistency
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
(In reply to Josh Berman from comment #0)
Actual
Secondary text color = color-mix(in srgb, currentColor 80%, transparent)Expected
Secondary text color = color-mix(in srgb, currentColor 60%, transparent)This should be applied on new tab page and on Fx View for consistency
This carries risk for not meeting a11y standards with some of our themes and probably even more so with third-party themes. I'm skeptical that we should do this for text that's just "secondary" rather than disabled. Have you or could you please evaluate potential a11y implications here before we implement any change?
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Adding a11y team to this bug for feedback.
Comment 3•2 years ago
|
||
Can you please link a figma spec or provide more information in the bug description? Ideally I'd like to see screenshots of the current vs. expected behaviour and contrast ratios of each.
I don't know what this change is in reference to.
Reporter | ||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
I assume the perf:frontend keyword was added accidentally...
Reporter | ||
Comment 5•2 years ago
|
||
I'll evaluate further and get back to you with more information. Thanks for raising these concerns.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 6•2 years ago
|
||
Good call on the contrast - It's an issue in dark mode. If we bump it to 70% and split the difference it does still pass everywhere and gets us closer to our spec'd secondary text color. That sound good?
Comment 7•2 years ago
|
||
Josh, can you add a link to the Figma spec for Morgan?
Reporter | ||
Comment 8•2 years ago
|
||
Hey Ray,
I have no way of creating these colors except by using dev tools to apply the new equation on the Fx View page and inspecting the color. Any figma representation I have will be inexact.
If you want to use devtools, the code would be
color: color-mix(in srgb, currentColor 70%, transparent)
I was applying this to a header element to allow me a larger surface area to color pick and then running the background and foreground colors through webaim contrast checker. At 70%, every foreground/background combination is above a 4.5:1 contrast ratio.
Reporter | ||
Comment 9•2 years ago
|
||
Morgan, I'd also be happy to connect with you and just walk through this live and we can discuss. Let me know.
Comment 10•2 years ago
|
||
:Josh, could you attach a screenshot of the current behaviour vs. the new proposed behaviour?
As long as the contrast ratios pass AA for the text size they're on, I think we're fine. Does this change modify how the text is displayed in HCM, too? We'll need AAA ratios there.
Reporter | ||
Comment 11•2 years ago
|
||
I just tested in HCM and it doesn't modify the text color there.
I did my best to put together a figma file that represents the modification in behavior for default light theme, dark theme as well as various colorways as best as possible. At 60% we were under AA in dark theme by .3 and just under AA in some soft colorway themes by .01. At 70% we are AA compliant in default light/dark and existing colorway themes.
https://www.figma.com/file/SE4xHgOW84yLiv7vFugm9R/Firefox-View-Stepping-Stone?node-id=13033%3A154291
Assignee | ||
Updated•2 years ago
|
Comment 12•2 years ago
|
||
(In reply to Josh Berman from comment #11)
I just tested in HCM and it doesn't modify the text color there.
I did my best to put together a figma file that represents the modification in behavior for default light theme, dark theme as well as various colorways as best as possible. At 60% we were under AA in dark theme by .3 and just under AA in some soft colorway themes by .01. At 70% we are AA compliant in default light/dark and existing colorway themes.
https://www.figma.com/file/SE4xHgOW84yLiv7vFugm9R/Firefox-View-Stepping-Stone?node-id=13033%3A154291
Thank you for creating the mockup with examples, Josh! In the file, I added comments with actual color contrast ratios and if they pass/fail the AA and AAA conformance levels and noted when they're acceptable for HCM too (when they pass AAA):
- It looks like the
current 80%
is the best because it passes everything for AAA and would be acceptable for HCM themes too. - But even 70% does not fail AA - the secondary text still provides contrast ratio of above 4.5:1 (all were 6+), which is accessible for non-HCM themes, while the default Dark theme and
Active
colorway provide HCM-friendly contrast as well. - I haven't seen in the Figma file any 60% examples, but per your comment, this would introduce AA fails which is an accessibility issue per WCAG for standard sized text. To make it compliant, text could be made larger (24px and up) or the text could be 18.5px or larger when it is bold - then the 3:1 contrast ratio is considered acceptable for a text. Otherwise, all text should be 4.5:1 to be Level AA compliant.
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Josh, based on Anna's comment, what's the final UX guidance on what, if anything, we want to change here? :-)
Updated•2 years ago
|
Reporter | ||
Comment 14•2 years ago
|
||
I'm comfortable saying we move forward with this solution (#2 from Anna's comment) which passes AA but does not pass AAA.
(In reply to Anna Yeddi [:ayeddi] from comment #12)
- But even 70% does not fail AA - the secondary text still provides contrast ratio of above 4.5:1 (all were 6+), which is accessible for non-HCM themes, while the default Dark theme and
Active
colorway provide HCM-friendly contrast as well.
That said if Anna feels strongly we should be AAA compliant then let's leave as is.
Comment 15•2 years ago
|
||
While AAA compliance is always most preferable one, having AA compliant colors is sufficient for default themes (non-HCM).
On Windows HCM though the higher transparency fails AAA (which is required when prefers-contrast
/ HCM enabled) when it's reduced to 60% the Recently Closed
secondary text fails AAA for a regular text - see the screenshots attached to compare 70% vs 60% transparency on Windows 11 Night Sky HCM. Maybe we can add a query to have 100% opacity when on HCM?
It passes on macOS, because the Increase contrast
mode (OS HCM) auto-enables Reduce transparency
which resolves issues like this.
Comment 16•2 years ago
|
||
Reporter | ||
Comment 17•2 years ago
|
||
Ok, let's do 70% which passes in HCM at AAA but let's still add a query to have 100% opacity when on HCM. That makes sense to me.
Comment 18•2 years ago
|
||
(In reply to Josh Berman from comment #17)
Ok, let's do 70% which passes in HCM at AAA but let's still add a query to have 100% opacity when on HCM. That makes sense to me.
Awesome, thank you, Josh!
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 19•2 years ago
|
||
Comment 20•2 years ago
|
||
Comment 21•2 years ago
|
||
Backed out for causing new failures on _theme.scss.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL sasslint | content-src/styles/_theme.scss(97, 69): No double semicolons allowed (trailing-semicolon)
Assignee | ||
Comment 22•2 years ago
|
||
Patch updated with extra semicolon removed. Waiting for review.
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
bugherder |
Comment 25•2 years ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit auto_nag documentation.
Comment 26•2 years ago
|
||
The patch landed in nightly and beta is affected.
:kcochrane, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox107
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Comment 27•2 years ago
|
||
Seeing unchecked-in changes in respective activity-stream-[os] CSS after running npm run bundle --prefix browser/components/newtab
on latest central most probably due to changes in the patch , will be great if you can address by landing followup patch with fix thanks!
Assignee | ||
Comment 28•2 years ago
|
||
Assignee | ||
Comment 29•2 years ago
|
||
Sorry I wasn't aware of the process for those files, but I just submitted a follow-up patch to hopefully resolve.
Updated•2 years ago
|
Comment 30•2 years ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 31•2 years ago
|
||
Comment 32•2 years ago
|
||
bugherder |
Updated•1 years ago
|
Description
•