Skip to content

Commit 974c9d2

Browse files
committed
accessibilityValue now used for values for TextRow + EditableTextRow. EditableTextRow also checks isUserInteractionEnabled for accessibilityHint
1 parent 985d572 commit 974c9d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

WordPress/Classes/Utility/WPImmuTableRows.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ struct EditableTextRow: ImmuTableRow {
9494
cell.textLabel?.text = title
9595
cell.detailTextLabel?.text = value
9696
cell.accessibilityLabel = title
97-
cell.accessibilityHint = value
97+
cell.accessibilityValue = value
98+
if cell.isUserInteractionEnabled {
99+
cell.accessibilityHint = NSLocalizedString("Tap to edit", comment: "Accessibility hint prompting the user to tap a table row to edit its value.")
100+
}
98101
cell.accessoryType = .disclosureIndicator
99102
if accessoryImage != nil {
100103
cell.accessoryView = UIImageView(image: accessoryImage)
@@ -132,7 +135,7 @@ struct TextRow: ImmuTableRow {
132135
cell.textLabel?.text = title
133136
cell.detailTextLabel?.text = value
134137
cell.accessibilityLabel = title
135-
cell.accessibilityHint = value
138+
cell.accessibilityValue = value
136139

137140
cell.selectionStyle = .none
138141

0 commit comments

Comments
 (0)