Fix VoiceOver trap in thread titles

This commit is contained in:
Jed Fox 2022-12-15 07:28:05 -05:00
parent 367b52bf64
commit 13c54c39f1
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
1 changed files with 4 additions and 0 deletions

View File

@ -51,16 +51,20 @@ extension DoubleTitleLabelNavigationBarTitleView {
containerView.addArrangedSubview(titleLabel)
containerView.addArrangedSubview(subtitleLabel)
isAccessibilityElement = true
}
func update(title: String, subtitle: String?) {
titleLabel.configure(content: PlaintextMetaContent(string: title))
update(subtitle: subtitle)
accessibilityLabel = subtitle.map { "\(title), \($0)" } ?? title
}
func update(titleMetaContent: MetaContent, subtitle: String?) {
titleLabel.configure(content: titleMetaContent)
update(subtitle: subtitle)
accessibilityLabel = subtitle.map { "\(titleMetaContent.string), \($0)" } ?? titleMetaContent.string
}
func update(subtitle: String?) {