-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix/a11y-1334] Add Spaces text background color if Increase Contrast is on #1451
base: master
Are you sure you want to change the base?
Conversation
var contrastObservation: NSObjectProtocol? | ||
|
||
func setupHighContrastMode() { | ||
contrastObservation = NotificationCenter.default.addObserver(forName: UIAccessibility.darkerSystemColorsStatusDidChangeNotification, object: nil, queue: .main, using: { [weak self] _ in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove observer is missing on deinit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer necessary as observers added via this method are automatically removed once the returned observation
object is deallocated. As the returned contrastObservation
object is released and deallocated at the time DriveHeaderCell
is deinited/deallocated, the observation is automatically removed.
For text, the contrast threshold should be 4.5:1 and up None of the existing ones, with or without the "increase Contrast" reaches that value.
NOTE: color values are not totally exact. Dark background for the Space name when "Increase Contrast" is checked in ✅ |
…ifferent color if high contrast mode is enabled in System Settings - ThemeCollection: - add alternative 100% contrast colors for labels to further address #1451 - fix typo in var name - fix swift-lint warning
@jesmrec Thanks for the analysis. I have since made changes to increase contrast even further for those elements when High Contrast is enabled in System Settings. Please have another look. |
- DriveListCell: hide subtitle label if subtitle is not set or empty - DriveHeaderCell: make sensitive to high contrast mode, adding a dark background if detected or changed to
…ifferent color if high contrast mode is enabled in System Settings - ThemeCollection: - add alternative 100% contrast colors for labels to further address #1451 - fix typo in var name - fix swift-lint warning
4b2ed99
to
47eba9a
Compare
Thanks for the update @felix-schwarz. Added a column in the table above with the contrast checks in the latest commit Just one exception: the green/red buttons in the "shared with me" view ( |
Description
Related Issue
#1334
Types of changes