Commit 9bd814b3 authored by Jose Blaya's avatar Jose Blaya
Browse files

Add accessibility label to purchase cells

parent f4b55064
...@@ -34,6 +34,8 @@ class PurchasePlanCell: UICollectionViewCell, Restylable { ...@@ -34,6 +34,8 @@ class PurchasePlanCell: UICollectionViewCell, Restylable {
isSelected = false isSelected = false
labelBestValue.text = L10n.Welcome.Plan.bestValue.uppercased() labelBestValue.text = L10n.Welcome.Plan.bestValue.uppercased()
selectedPlanImageView.alpha = 0 selectedPlanImageView.alpha = 0
self.accessibilityTraits = UIAccessibilityTraits.button
self.isAccessibilityElement = true
} }
func fill(plan: PurchasePlan) { func fill(plan: PurchasePlan) {
...@@ -57,6 +59,7 @@ class PurchasePlanCell: UICollectionViewCell, Restylable { ...@@ -57,6 +59,7 @@ class PurchasePlanCell: UICollectionViewCell, Restylable {
labelPlan.text = plan.title labelPlan.text = plan.title
labelDetail.text = plan.detail labelDetail.text = plan.detail
labelPrice.text = L10n.Welcome.Plan.priceFormat(plan.monthlyPriceString) labelPrice.text = L10n.Welcome.Plan.priceFormat(plan.monthlyPriceString)
self.accessibilityLabel = "\(plan.title) \(plan.detail) \(labelPrice.text)"
viewBestValue.isHidden = !plan.bestValue viewBestValue.isHidden = !plan.bestValue
if viewBestValue.isHidden { if viewBestValue.isHidden {
bestValueHeightConstraint.constant = 0 bestValueHeightConstraint.constant = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment