Skip to content

Commit

Permalink
Bugfix FXIOS-7575 [v120] Review Checker drawer has no programmatic he…
Browse files Browse the repository at this point in the history
…adings but includes implicit headings (#16957)

* Adding header trait to cards

* Adding header trait to collapsible card
  • Loading branch information
thatswinnie authored Oct 23, 2023
1 parent a524e6e commit 9636b63
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public class CollapsibleCardView: ShadowCardView, UIGestureRecognizerDelegate {
size: 15.0,
weight: .semibold)
label.numberOfLines = 0
label.accessibilityTraits.insert(.header)
}

private lazy var expandButton: UIButton = .build { view in
Expand Down
1 change: 1 addition & 0 deletions Client/Frontend/Fakespot/FakespotViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class FakespotViewController:
size: UX.titleLabelFontSize,
weight: .semibold)
label.accessibilityIdentifier = AccessibilityIdentifiers.Shopping.sheetHeaderTitle
label.accessibilityTraits.insert(.header)
label.setContentCompressionResistancePriority(.required, for: .horizontal)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class FakespotAdjustRatingView: UIView, Notifiable, ThemeApplicable {
size: UX.titleFontSize,
weight: .semibold)
label.numberOfLines = 0
label.accessibilityTraits.insert(.header)
}

private lazy var descriptionLabel: UILabel = .build { label in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class FakespotHighlightsCardView: UIView, ThemeApplicable {
size: UX.titleFontSize,
weight: .semibold)
label.numberOfLines = 0
label.accessibilityTraits.insert(.header)
}

private lazy var contentStackView: UIStackView = .build { view in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ final class FakespotMessageCardView: UIView, ThemeApplicable, Notifiable {
label.numberOfLines = 0
label.adjustsFontForContentSizeCategory = true
label.setContentCompressionResistancePriority(.required, for: .vertical)
label.accessibilityTraits.insert(.header)
}

private lazy var descriptionLabel: UILabel = .build { label in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ final class FakespotNoAnalysisCardView: UIView, ThemeApplicable {
label.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .headline,
size: UX.headlineLabelFontSize,
weight: .bold)
label.accessibilityTraits.insert(.header)
}

private lazy var bodyLabel: UILabel = .build { label in
Expand Down
1 change: 1 addition & 0 deletions Client/Frontend/Fakespot/Views/FakespotOptInCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ final class FakespotOptInCardView: UIView, ThemeApplicable {
label.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .headline,
size: UX.headerLabelFontSize,
weight: .medium)
label.accessibilityTraits.insert(.header)
}

private lazy var bodyFirstParagraphLabel: UILabel = .build { label in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class FakespotReliabilityCardView: UIView, ThemeApplicable {
size: UX.titleFontSize,
weight: .semibold)
view.numberOfLines = 0
view.accessibilityTraits.insert(.header)
}

private lazy var reliabilityScoreView: UIView = .build { view in
Expand Down

0 comments on commit 9636b63

Please sign in to comment.