@@ -115,8 +115,8 @@ extension DisplayOptionsViewController {
115
115
return DigitGroupingRowViewModel (
116
116
title: " Digit Grouping " ,
117
117
options: [
118
- ( title: " •• •• •• " , accessibilityLabel: " Groups of two digits " , value: 2 ) ,
119
- ( title: " ••• ••• " , accessibilityLabel: " Groups of three digits " , value: 3 ) ,
118
+ ( title: " •• •• •• " , accessibilityLabel: " Groups of two digits " , value: 2 , accessibilityHint : " For example, 38 62 47 " ) ,
119
+ ( title: " ••• ••• " , accessibilityLabel: " Groups of three digits " , value: 3 , accessibilityHint : " For example, 386 247 " ) ,
120
120
] ,
121
121
value: viewModel. digitGroupSize,
122
122
changeAction: DisplayOptions . Effect. setDigitGroupSize
@@ -129,13 +129,13 @@ extension DisplayOptionsViewController {
129
129
// swiftlint:disable large_tuple
130
130
struct DigitGroupingRowViewModel < Action> {
131
131
let title : String
132
- let segments : [ ( title: String , accessibilityLabel: String , action: Action ) ]
132
+ let segments : [ ( title: String , accessibilityLabel: String , accessibilityHint : String , action: Action ) ]
133
133
let selectedSegmentIndex : Int ?
134
134
135
- init < V: Equatable > ( title: String , options: [ ( title: String , accessibilityLabel: String , value: V ) ] , value: V , changeAction: ( V ) -> Action ) {
135
+ init < V: Equatable > ( title: String , options: [ ( title: String , accessibilityLabel: String , value: V , accessibilityHint : String ) ] , value: V , changeAction: ( V ) -> Action ) {
136
136
self . title = title
137
137
segments = options. map ( { option in
138
- ( title: option. title, accessibilityLabel: option. accessibilityLabel, action: changeAction ( option. value) )
138
+ ( title: option. title, accessibilityLabel: option. accessibilityLabel, accessibilityHint : option . accessibilityHint , action: changeAction ( option. value) )
139
139
} )
140
140
selectedSegmentIndex = options. map ( { $0. value } ) . index ( of: value)
141
141
}
@@ -224,6 +224,7 @@ class DigitGroupingRowCell<Action>: UITableViewCell {
224
224
// This is a hack to set the accessibility label on each segment, but for now it works.
225
225
// If a future iOS update ever changes the internals of UISegmentedControl, this may break horribly.
226
226
segmentedControl. subviews. last? . accessibilityLabel = segment. accessibilityLabel
227
+ segmentedControl. subviews. last? . accessibilityHint = segment. accessibilityHint
227
228
}
228
229
// Store the action associated with each segment
229
230
actions = viewModel. segments. map ( { $0. action } )
0 commit comments