Showing
1 changed file
with
24 additions
and
0 deletions
... | @@ -111,6 +111,7 @@ import SwiftEventBus | ... | @@ -111,6 +111,7 @@ import SwiftEventBus |
111 | 111 | ||
112 | toggleTerms() | 112 | toggleTerms() |
113 | 113 | ||
114 | + setupAccessibilty() | ||
114 | } | 115 | } |
115 | 116 | ||
116 | public override func viewWillAppear(_ animated: Bool) { | 117 | public override func viewWillAppear(_ animated: Bool) { |
... | @@ -123,6 +124,23 @@ import SwiftEventBus | ... | @@ -123,6 +124,23 @@ import SwiftEventBus |
123 | 124 | ||
124 | 125 | ||
125 | // MARK: - Functions | 126 | // MARK: - Functions |
127 | + func setupAccessibilty() { | ||
128 | + couponImage.isAccessibilityElement = true | ||
129 | + couponImage.accessibilityLabel = "Φωτογραφία εκπτωτικού κουπονιού" | ||
130 | + couponImage.accessibilityTraits = .image | ||
131 | + | ||
132 | + redeemButton.isAccessibilityElement = true | ||
133 | + redeemButton.accessibilityLabel = redeemButton.title(for: .normal) | ||
134 | + redeemButton.accessibilityHint = "Διπλό πάτημα για άνοιγμα" | ||
135 | + redeemButton.accessibilityTraits = .button | ||
136 | + | ||
137 | + termsButton.isAccessibilityElement = true | ||
138 | + termsButton.accessibilityLabel = termsButton.title(for: .normal) | ||
139 | + termsButton.accessibilityHint = "Διπλό πάτημα για εμφάνιση" | ||
140 | + termsButton.accessibilityTraits = .button | ||
141 | + termsButton.accessibilityValue = "Συμπτυγμένο" | ||
142 | + } | ||
143 | + | ||
126 | func showSpinner() { | 144 | func showSpinner() { |
127 | // add the spinner view controller | 145 | // add the spinner view controller |
128 | // addChild(spinner) | 146 | // addChild(spinner) |
... | @@ -150,11 +168,17 @@ import SwiftEventBus | ... | @@ -150,11 +168,17 @@ import SwiftEventBus |
150 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height | 168 | termsTextViewHeight.constant = termsTextView.sizeThatFits(targetSize).height |
151 | 169 | ||
152 | termsButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | 170 | termsButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
171 | + | ||
172 | + termsButton.accessibilityValue = "Ανεπτυγμένο" | ||
173 | + termsButton.accessibilityHint = "Διπλό πάτημα για απόκρυψη" | ||
153 | } else { | 174 | } else { |
154 | termsTextView.isHidden = true | 175 | termsTextView.isHidden = true |
155 | termsTextViewHeight.constant = CGFloat(0) | 176 | termsTextViewHeight.constant = CGFloat(0) |
156 | 177 | ||
157 | termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | 178 | termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
179 | + | ||
180 | + termsButton.accessibilityValue = "Συμπτυγμένο" | ||
181 | + termsButton.accessibilityHint = "Διπλό πάτημα για εμφάνιση" | ||
158 | } | 182 | } |
159 | } | 183 | } |
160 | 184 | ... | ... |
-
Please register or login to post a comment