mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Merge pull request #771 from j-f1/fix-voiceover-trap
Fix VoiceOver trap in thread titles
This commit is contained in:
commit
e52315f0e0
@ -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?) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user