Add accessibility hint for segmented controls
This commit is contained in:
parent
b64c748b73
commit
97dec0f9d2
|
@ -32,6 +32,9 @@ class SegmentedPageViewController: UIPageViewController, UIPageViewControllerDel
|
||||||
// before the view has necessarily loaded
|
// before the view has necessarily loaded
|
||||||
segmentedControl = UISegmentedControl(items: titles)
|
segmentedControl = UISegmentedControl(items: titles)
|
||||||
segmentedControl.addTarget(self, action: #selector(segmentedControlChanged), for: .valueChanged)
|
segmentedControl.addTarget(self, action: #selector(segmentedControlChanged), for: .valueChanged)
|
||||||
|
// the segemented control itself is only focusable when VoiceOver is in Group navigation mode,
|
||||||
|
// so make it clear that to switch tabs the user needs to enter the group
|
||||||
|
segmentedControl.accessibilityHint = "Enter group to select timeline"
|
||||||
navigationItem.titleView = segmentedControl
|
navigationItem.titleView = segmentedControl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,10 @@ class ProfileHeaderView: UIView {
|
||||||
noteTextView.defaultFont = .preferredFont(forTextStyle: .body)
|
noteTextView.defaultFont = .preferredFont(forTextStyle: .body)
|
||||||
noteTextView.adjustsFontForContentSizeCategory = true
|
noteTextView.adjustsFontForContentSizeCategory = true
|
||||||
|
|
||||||
|
// the segemented control itself is only focusable when VoiceOver is in Group navigation mode,
|
||||||
|
// so make it clear that to switch tabs the user needs to enter the group
|
||||||
|
pagesSegmentedControl.accessibilityHint = "Enter group to select scope"
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(updateUIForPreferences), name: .preferencesChanged, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(updateUIForPreferences), name: .preferencesChanged, object: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue