From 13c54c39f17a9b96bf4798efa2808cec10d29c30 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 15 Dec 2022 07:28:05 -0500 Subject: [PATCH] Fix VoiceOver trap in thread titles --- .../View/Content/DoubleTitleLabelNavigationBarTitleView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mastodon/Scene/Share/View/Content/DoubleTitleLabelNavigationBarTitleView.swift b/Mastodon/Scene/Share/View/Content/DoubleTitleLabelNavigationBarTitleView.swift index f5ac0f8ec..52d9c9f1a 100644 --- a/Mastodon/Scene/Share/View/Content/DoubleTitleLabelNavigationBarTitleView.swift +++ b/Mastodon/Scene/Share/View/Content/DoubleTitleLabelNavigationBarTitleView.swift @@ -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?) {