Fix #4952 - Low contrast menus when reduced transparency/inc. contrast are enabled#5282
Merged
garvankeeley merged 4 commits intomozilla-mobile:masterfrom Aug 1, 2019
Conversation
Previous color was a result of no defined background color Blur effect in PhotonActionSheet disables on reduced transparency, enables otherwise Light theme removes alpha on background to deal with above case
Tint colors are modified by iOS when increased contrast is enabled — now, the behavior for PhotonActionSheetCell is accessible, in addition to being inline with ThemedWidgets.
This increases readability for when “increase contrast” is enabled.
garvankeeley
suggested changes
Jul 31, 2019
Also: - flipped reduce transparency logic to be more readable -> (isEnabled) instead of (!isEnabled) - Changed Theme ActionMenuColor to be inline with corresponding DarkTheme color, by just using defaultBackground
garvankeeley
approved these changes
Aug 1, 2019
pull bot
pushed a commit
to scope-demo/firefox-ios
that referenced
this pull request
Aug 1, 2019
…y/inc. contrast are enabled (mozilla-mobile#5282) * Night mode blur color, and reduce transparency Previous color was a result of no defined background color Blur effect in PhotonActionSheet disables on reduced transparency, enables otherwise Light theme removes alpha on background to deal with above case * Fixed title and subtitle text colors Tint colors are modified by iOS when increased contrast is enabled — now, the behavior for PhotonActionSheetCell is accessible, in addition to being inline with ThemedWidgets. * Night mode action foreground color -> white This increases readability for when “increase contrast” is enabled. * Disable theme bg alpha on reduced transprency Also: - flipped reduce transparency logic to be more readable -> (isEnabled) instead of (!isEnabled) - Changed Theme ActionMenuColor to be inline with corresponding DarkTheme color, by just using defaultBackground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4952
This PR addresses unreadable contrast in popover menus when the "reduced transparency" and/or "increased contrast" accessibility settings are enabled, specifically in night mode.
Reduced transparency behavior in popup views
The current behavior of popup views in night mode is actually a bug -- there was no defined background blur style for the night theme, it just used the normal theme's color.
Enabling reduced transparency would flatten the opaque blur effect view, and show the original white background.
This is fixed by defining a dark blur style (that matches the "close" button's color, save for transparency), and removing the 0.9 alpha on the light theme. Additionally, the blur is now conditionally applied when accessibility is turned on/off.
The potential downside here is decreased contrast with dark-background websites.
Increased contrast behavior in popup views
Previously, the popup action sheet cell would use
tintColoras its text color, which is not inline with other table views which userowColor. Enabling "increased contrast" causes iOS to darken the tint color, which doesn't help in this scenario (dark background!).The fix here is changing
tintColortorowColorfor thePhotonActionSheetCell, and modifying theforegroundcolor in theDarkThemefile.Sidenote:
Apple has no documentation on how reduced transparency/increased contrast is implemented! Most of my work here has been through the UI debugger.