diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 9d1f78201db..a2af10a8794 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -5,7 +5,7 @@
-----
- [*] Product Form: Fix crash related to picking photos [https://github.com/woocommerce/woocommerce-ios/pull/15275]
- [internal] Assign `siteID` and `productID` to image product upload statuses. [https://github.com/woocommerce/woocommerce-ios/pull/15196]
-
+- [*] Payments: Improved payment views' adaptability to larger accessibility font sizes [https://github.com/woocommerce/woocommerce-ios/pull/15328].
21.9
-----
diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift
index b14393e4b2b..9be9bc82492 100644
--- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift
+++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift
@@ -45,7 +45,7 @@ final class CardPresentModalBuiltInSuccessEmailSent: CardPresentPaymentsModalVie
let attributedString = NSMutableAttributedString(string: formattedMessage)
if let emailRange = formattedMessage.range(of: email) {
let nsRange = NSRange(emailRange, in: formattedMessage)
- attributedString.addAttributes([.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)], range: nsRange)
+ attributedString.addAttributes([.font: UIFont.preferredFont(forTextStyle: .body).bold], range: nsRange)
}
self.bottomAttributedTitle = attributedString
}
diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSuccessEmailSent.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSuccessEmailSent.swift
index 4aa3af1f173..2ee6a1fea22 100644
--- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSuccessEmailSent.swift
+++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSuccessEmailSent.swift
@@ -45,7 +45,7 @@ final class CardPresentModalSuccessEmailSent: CardPresentPaymentsModalViewModel
let attributedString = NSMutableAttributedString(string: formattedMessage)
if let emailRange = formattedMessage.range(of: email) {
let nsRange = NSRange(emailRange, in: formattedMessage)
- attributedString.addAttributes([.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize)], range: nsRange)
+ attributedString.addAttributes([.font: UIFont.preferredFont(forTextStyle: .body).bold], range: nsRange)
}
self.bottomAttributedTitle = attributedString
}
diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.swift
index 7f0e3c08517..13ec14409e7 100644
--- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.swift
+++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.swift
@@ -149,10 +149,12 @@ private extension CardPresentPaymentsModalViewController {
func styleTopTitle() {
topTitleLabel.applyBodyStyle()
+ topTitleLabel.numberOfLines = 0
}
func styleTopSubtitle() {
topSubtitleLabel.applyTitleStyle()
+ topSubtitleLabel.numberOfLines = 0
}
func styleBottomLabels() {
@@ -166,10 +168,12 @@ private extension CardPresentPaymentsModalViewController {
func styleBottomTitle() {
bottomTitleLabel.applySubheadlineStyle()
+ bottomTitleLabel.numberOfLines = 0
}
func styleBottomSubtitle() {
bottomSubtitleLabel.applyFootnoteStyle()
+ bottomSubtitleLabel.numberOfLines = 0
}
func styleActionButtons() {
@@ -185,14 +189,14 @@ private extension CardPresentPaymentsModalViewController {
func stylePrimaryButton() {
primaryButton.applyPrimaryButtonStyle()
primaryButton.titleLabel?.adjustsFontSizeToFitWidth = true
- primaryButton.titleLabel?.minimumScaleFactor = 0.5
+ primaryButton.titleLabel?.minimumScaleFactor = 0.3
primaryButton.titleLabel?.lineBreakMode = .byClipping
}
func styleSecondaryButton() {
secondaryButton.applyPaymentsModalCancelButtonStyle()
secondaryButton.titleLabel?.adjustsFontSizeToFitWidth = true
- secondaryButton.titleLabel?.minimumScaleFactor = 0.5
+ secondaryButton.titleLabel?.minimumScaleFactor = 0.3
secondaryButton.titleLabel?.lineBreakMode = .byClipping
}
@@ -200,7 +204,7 @@ private extension CardPresentPaymentsModalViewController {
if viewModel.actionsMode != .secondaryActionAndAuxiliaryButton {
auxiliaryButton.applyLinkButtonStyle()
}
- auxiliaryButton.titleLabel?.minimumScaleFactor = 0.5
+ auxiliaryButton.titleLabel?.minimumScaleFactor = 0.3
auxiliaryButton.titleLabel?.adjustsFontSizeToFitWidth = true
auxiliaryButton.titleLabel?.lineBreakMode = .byClipping
}
diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.xib b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.xib
index c5fba549de0..c3d56ef90b2 100644
--- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.xib
+++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.xib
@@ -15,7 +15,7 @@
-
+
@@ -40,137 +40,180 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
-
-
-
-
+
-
+
-
-
-
@@ -179,12 +222,6 @@
-
-
-
-
-
-
@@ -199,7 +236,7 @@
-
+