Merge pull request #771 from j-f1/fix-voiceover-trap

Fix VoiceOver trap in thread titles
This commit is contained in:
Marcus Kida 2022-12-16 21:17:29 +01:00 committed by GitHub
commit e52315f0e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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?) {