Fix VoiceOver reading profile field names/values in incorrect order
This commit is contained in:
parent
0566f0ddfa
commit
ef1db466b9
|
@ -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…
Reference in New Issue