Browse Source

Fix VoiceOver reading profile field names/values in incorrect order

async
Shadowfacts 4 months ago
parent
commit
ef1db466b9
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
  1. 12
      Tusker/Views/Profile Header/ProfileHeaderView.swift

12
Tusker/Views/Profile Header/ProfileHeaderView.swift

@ -132,6 +132,7 @@ class ProfileHeaderView: UIView {
fieldNamesStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
fieldValuesStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
var fieldAccessibilityElements = [Any]()
for field in account.fields {
let nameLabel = EmojiLabel()
nameLabel.text = field.name
@ -155,7 +156,18 @@ class ProfileHeaderView: UIView {
fieldValuesStackView.addArrangedSubview(valueTextView)
nameLabel.heightAnchor.constraint(equalTo: valueTextView.heightAnchor).isActive = true
fieldAccessibilityElements.append(nameLabel)
fieldAccessibilityElements.append(valueTextView)
}
accessibilityElements = [
displayNameLabel!,
usernameLabel!,
noteTextView!,
] + fieldAccessibilityElements + [
moreButton!,
pagesSegmentedControl!,
]
}
private func updateRelationship() {

Loading…
Cancel
Save