Showing
1 changed file
with
24 additions
and
0 deletions
... | @@ -130,6 +130,8 @@ import SwiftEventBus | ... | @@ -130,6 +130,8 @@ import SwiftEventBus |
130 | moreTextView.isScrollEnabled = false | 130 | moreTextView.isScrollEnabled = false |
131 | 131 | ||
132 | toggleMore() | 132 | toggleMore() |
133 | + | ||
134 | + setupAccessibilty() | ||
133 | } | 135 | } |
134 | 136 | ||
135 | public override func viewWillAppear(_ animated: Bool) { | 137 | public override func viewWillAppear(_ animated: Bool) { |
... | @@ -141,6 +143,22 @@ import SwiftEventBus | ... | @@ -141,6 +143,22 @@ import SwiftEventBus |
141 | } | 143 | } |
142 | 144 | ||
143 | // MARK: - Functions | 145 | // MARK: - Functions |
146 | + func setupAccessibilty() { | ||
147 | + heroImage.isAccessibilityElement = true | ||
148 | + heroImage.accessibilityLabel = "Φωτογραφία εκπτωτικού κουπονιού" | ||
149 | + heroImage.accessibilityTraits = .image | ||
150 | + | ||
151 | + activateButton.isAccessibilityElement = true | ||
152 | + activateButton.accessibilityLabel = activateButton.title(for: .normal) | ||
153 | + activateButton.accessibilityHint = "Διπλό πάτημα για άνοιγμα" | ||
154 | + activateButton.accessibilityTraits = .button | ||
155 | + | ||
156 | + moreButton.isAccessibilityElement = true | ||
157 | + moreButton.accessibilityLabel = moreButton.title(for: .normal) | ||
158 | + moreButton.accessibilityHint = "Διπλό πάτημα για εμφάνιση" | ||
159 | + moreButton.accessibilityTraits = .button | ||
160 | + moreButton.accessibilityValue = "Συμπτυγμένο" | ||
161 | + } | ||
144 | func showSpinner() { | 162 | func showSpinner() { |
145 | // add the spinner view controller | 163 | // add the spinner view controller |
146 | // addChild(spinner) | 164 | // addChild(spinner) |
... | @@ -168,11 +186,17 @@ import SwiftEventBus | ... | @@ -168,11 +186,17 @@ import SwiftEventBus |
168 | moreTextViewHeight.constant = moreTextView.sizeThatFits(targetSize).height | 186 | moreTextViewHeight.constant = moreTextView.sizeThatFits(targetSize).height |
169 | 187 | ||
170 | moreButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | 188 | moreButton.setImage(UIImage(named: "ic_up_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
189 | + | ||
190 | + moreButton.accessibilityValue = "Ανεπτυγμένο" | ||
191 | + moreButton.accessibilityHint = "Διπλό πάτημα για απόκρυψη" | ||
171 | } else { | 192 | } else { |
172 | moreTextView.isHidden = true | 193 | moreTextView.isHidden = true |
173 | moreTextViewHeight.constant = CGFloat(0) | 194 | moreTextViewHeight.constant = CGFloat(0) |
174 | 195 | ||
175 | moreButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) | 196 | moreButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) |
197 | + | ||
198 | + moreButton.accessibilityValue = "Συμπτυγμένο" | ||
199 | + moreButton.accessibilityHint = "Διπλό πάτημα για εμφάνιση" | ||
176 | } | 200 | } |
177 | } | 201 | } |
178 | 202 | ... | ... |
-
Please register or login to post a comment