Add .button accessibility trait to ProfileDetailsLabel, if necessary

Addresses PR 6270.
This commit is contained in:
Pierre-Yves Lapersonne 2026-05-21 17:14:09 -07:00 committed by Sasha Weiss
parent 5897252015
commit 7166c115af

View File

@ -52,6 +52,9 @@ public class ProfileDetailLabel: UIStackView {
self.layoutMargins = .zero
self.isAccessibilityElement = true
self.accessibilityLabel = attributedTitle.string
if tapAction != nil {
self.accessibilityTraits = .button
}
// Make the icon an attributed string attachment so that it
// 1. scales with Dynamic Type.