Skip to content

Commit

Permalink
Merge pull request hyperoslo#185 from thesquarefoot/accessibility
Browse files Browse the repository at this point in the history
Add accessiblity labels to the photo button and gallery images
  • Loading branch information
RamonGilabert authored Aug 1, 2016
2 parents 0d2b56b + 0d0af8c commit b985888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/BottomView/ButtonPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ButtonPicker: UIButton {
func setupButton() {
backgroundColor = .whiteColor()
layer.cornerRadius = Dimensions.buttonSize / 2
accessibilityLabel = "Take photo"
addTarget(self, action: #selector(pickerButtonDidPress(_:)), forControlEvents: .TouchUpInside)
addTarget(self, action: #selector(pickerButtonDidHighlight(_:)), forControlEvents: .TouchDown)
}
Expand Down
4 changes: 4 additions & 0 deletions Source/ImageGallery/ImageGalleryViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ImageGalleryViewCell: UICollectionViewCell {
view.clipsToBounds = true
contentView.addSubview(view)
}

isAccessibilityElement = true
accessibilityLabel = "Photo"

setupConstraints()
}

Expand Down

0 comments on commit b985888

Please sign in to comment.