summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-06-03 13:29:08 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-06-04 14:51:03 +0200
commit89a050f74f91a1ccae739f6c5a27c40331c535ad (patch)
treea1af7dc78f011fce9cc2494a648369cf2ec5df18
parent30caeaf50416f8d6b79900859e3682cd2e7ccabd (diff)
downloadmullvadvpn-89a050f74f91a1ccae739f6c5a27c40331c535ad.tar.xz
mullvadvpn-89a050f74f91a1ccae739f6c5a27c40331c535ad.zip
Accessibility: add .notEnabled trait when SelectLocationCell is disabled
-rw-r--r--ios/MullvadVPN/SelectLocationCell.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/ios/MullvadVPN/SelectLocationCell.swift b/ios/MullvadVPN/SelectLocationCell.swift
index 1aa60d93bf..5fee38e29a 100644
--- a/ios/MullvadVPN/SelectLocationCell.swift
+++ b/ios/MullvadVPN/SelectLocationCell.swift
@@ -134,6 +134,12 @@ class SelectLocationCell: BasicTableViewCell {
private func updateDisabled() {
locationLabel.alpha = isDisabled ? 0.2 : 1
collapseButton.alpha = isDisabled ? 0.2 : 1
+
+ if isDisabled {
+ accessibilityTraits.insert(.notEnabled)
+ } else {
+ accessibilityTraits.remove(.notEnabled)
+ }
}
private func updateBackgroundColor() {