Make profile fields view VoiceOver accessible

This commit is contained in:
Shadowfacts 2022-11-12 14:43:47 -05:00
parent ccc47e204d
commit fa5abc27f7
2 changed files with 8 additions and 2 deletions

View File

@ -21,6 +21,13 @@ class ProfileFieldsView: UIView {
traitCollection.horizontalSizeClass == .compact && traitCollection.preferredContentSizeCategory > .extraLarge traitCollection.horizontalSizeClass == .compact && traitCollection.preferredContentSizeCategory > .extraLarge
} }
override var accessibilityElements: [Any]? {
get {
fieldViews.flatMap { [$0.0, $0.1] }
}
set {}
}
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
commonInit() commonInit()

View File

@ -149,8 +149,7 @@ class ProfileHeaderView: UIView {
displayNameLabel!, displayNameLabel!,
usernameLabel!, usernameLabel!,
noteTextView!, noteTextView!,
// TODO: voiceover for fieldsview fieldsView!,
// fieldsView!,
moreButton!, moreButton!,
pagesSegmentedControl!, pagesSegmentedControl!,
] ]