Fix #4952 - Low contrast menus when reduced transparency/inc. contrast are enabled #5282
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
tintColor
as 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
tintColor
torowColor
for thePhotonActionSheetCell
, and modifying theforeground
color in theDarkTheme
file.Sidenote:
Apple has no documentation on how reduced transparency/increased contrast is implemented! Most of my work here has been through the UI debugger.