diff --git a/Mastodon/Protocol/AvatarConfigurableView.swift b/Mastodon/Protocol/AvatarConfigurableView.swift index 3d2dba802..e33c01278 100644 --- a/Mastodon/Protocol/AvatarConfigurableView.swift +++ b/Mastodon/Protocol/AvatarConfigurableView.swift @@ -47,6 +47,10 @@ extension AvatarConfigurableView { configurableAvatarButton?.layer.cornerRadius = 0 configurableAvatarButton?.layer.cornerCurve = .circular + // accessibility + configurableAvatarImageView?.accessibilityIgnoresInvertColors = true + configurableAvatarButton?.accessibilityIgnoresInvertColors = true + defer { avatarConfigurableView(self, didFinishConfiguration: configuration) } diff --git a/Mastodon/Scene/MediaPreview/Paging/Image/MediaPreviewImageView.swift b/Mastodon/Scene/MediaPreview/Paging/Image/MediaPreviewImageView.swift index 0f2ba82fb..0e4aa6d89 100644 --- a/Mastodon/Scene/MediaPreview/Paging/Image/MediaPreviewImageView.swift +++ b/Mastodon/Scene/MediaPreview/Paging/Image/MediaPreviewImageView.swift @@ -16,6 +16,8 @@ final class MediaPreviewImageView: UIScrollView { imageView.contentMode = .scaleAspectFit imageView.clipsToBounds = true imageView.isUserInteractionEnabled = true + // accessibility + imageView.accessibilityIgnoresInvertColors = true return imageView }() diff --git a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift index 1e09116d3..0bcc68bfd 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift @@ -45,9 +45,8 @@ final class ProfileHeaderView: UIView { imageView.backgroundColor = ProfileHeaderView.bannerImageViewPlaceholderColor imageView.layer.masksToBounds = true imageView.isUserInteractionEnabled = true - // #if DEBUG - // imageView.image = .placeholder(color: .red) - // #endif + // accessibility + imageView.accessibilityIgnoresInvertColors = true return imageView }() let bannerImageViewOverlayView: UIView = { diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift index 44a7e7574..05bb4d10d 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift @@ -15,6 +15,8 @@ protocol SettingsAppearanceTableViewCellDelegate: class { class AppearanceView: UIView { lazy var imageView: UIImageView = { let view = UIImageView() + // accessibility + view.accessibilityIgnoresInvertColors = true return view }() lazy var titleLabel: UILabel = { diff --git a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift index ea943fb0e..486f97e3c 100644 --- a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift +++ b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift @@ -65,6 +65,9 @@ extension MosaicImageViewContainer: ContentWarningOverlayViewDelegate { extension MosaicImageViewContainer { private func _init() { + // accessibility + accessibilityIgnoresInvertColors = true + container.translatesAutoresizingMaskIntoConstraints = false container.axis = .horizontal container.distribution = .fillEqually diff --git a/Mastodon/Scene/Share/View/Container/PlayerContainerView.swift b/Mastodon/Scene/Share/View/Container/PlayerContainerView.swift index f7a8a1546..32a4dc147 100644 --- a/Mastodon/Scene/Share/View/Container/PlayerContainerView.swift +++ b/Mastodon/Scene/Share/View/Container/PlayerContainerView.swift @@ -46,6 +46,9 @@ final class PlayerContainerView: UIView { extension PlayerContainerView { private func _init() { + // accessibility + accessibilityIgnoresInvertColors = true + container.translatesAutoresizingMaskIntoConstraints = false addSubview(container) containerHeightLayoutConstraint = container.heightAnchor.constraint(equalToConstant: 162).priority(.required - 1) diff --git a/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift b/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift index 74d82badd..17ba9c660 100644 --- a/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift +++ b/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift @@ -73,6 +73,8 @@ extension MediaHostToMediaPreviewViewControllerAnimatedTransitioning { imageView.contentMode = .scaleAspectFill imageView.isUserInteractionEnabled = false imageView.image = transitionItem.image + // accessibility + imageView.accessibilityIgnoresInvertColors = true return imageView }() transitionItem.targetFrame = transitionTargetFrame