Skip to content

Commit ca5fdb5

Browse files
committed
Add support for voice over to the pencil button
1 parent 32ea485 commit ca5fdb5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

WooCommerce/Classes/ViewRelated/Orders/Cells/SummaryTableViewCell.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,24 @@ private extension SummaryTableViewCell {
115115
updateStatusButton.setImage(pencilIcon, for: .normal)
116116

117117
updateStatusButton.addTarget(self, action: #selector(editWasTapped), for: .touchUpInside)
118+
119+
configureIconForVoiceOver()
118120
}
119121

120122
@objc func editWasTapped() {
121123
onPencilTouchUp?()
122124
}
123125
}
126+
127+
128+
/// MARK: - VoiceOver
129+
///
130+
private extension SummaryTableViewCell {
131+
func configureIconForVoiceOver() {
132+
updateStatusButton.accessibilityLabel = NSLocalizedString("Update Order Status",
133+
comment: "Accessibility label for the button that allows updating the order status in Order Details View ")
134+
updateStatusButton.accessibilityTraits = .button
135+
updateStatusButton.accessibilityHint = NSLocalizedString("Opens a list of available statuses.",
136+
comment: "Accessibility hint for the button that allows updating the order status in Order Details View")
137+
}
138+
}

0 commit comments

Comments
 (0)