gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 17/30: accessibilityAddTraits


From: gnunet
Subject: [taler-taler-ios] 17/30: accessibilityAddTraits
Date: Sun, 19 Nov 2023 23:53:41 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 2f43f4269cbc47a00c503f02f6c7f75bb2920d8f
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Nov 18 19:29:33 2023 +0100

    accessibilityAddTraits
---
 TalerWallet1/Views/HelperViews/SelectDays.swift | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/SelectDays.swift 
b/TalerWallet1/Views/HelperViews/SelectDays.swift
index 081f924..3b3315c 100644
--- a/TalerWallet1/Views/HelperViews/SelectDays.swift
+++ b/TalerWallet1/Views/HelperViews/SelectDays.swift
@@ -34,8 +34,6 @@ struct SelectDays: View {
     }
 
     var body: some View {
-        let selectedStr = String(localized: "selected", comment: "VoiceOver 
hint which button is selected")
-
         Section {   // (alignment: .leading)
             Text("Expires in:")
                 .accessibilityLabel("Choose the expiration duration")
@@ -50,7 +48,7 @@ struct SelectDays: View {
                         Text("\(ONEDAY) Day", comment: "1 Day, might get 
plural (e.g. 2..3 Days), 4 letters max., abbreviate if longer")     // TODO: 
Plural
                     }
                 }.buttonStyle(TalerButtonStyle(type: (selected == ONEDAY) ? 
.prominent : .bordered, dimmed: true))
-                    .accessibilityValue((selected == ONEDAY) ? selectedStr : 
EMPTYSTRING)
+                    .accessibilityAddTraits(selected == ONEDAY ? .isSelected : 
[])
                     .disabled(!isEnabled)
 
                 Button(action: sevenDayAction) {
@@ -60,7 +58,7 @@ struct SelectDays: View {
                         Text("\(SEVENDAYS) Days", comment: "7 Days, always 
plural (3..9), 4 letters max., abbreviate if longer")
                     }
                 }.buttonStyle(TalerButtonStyle(type: (selected == SEVENDAYS) ? 
.prominent : .bordered, dimmed: true))
-                    .accessibilityValue((selected == SEVENDAYS) ? selectedStr 
: EMPTYSTRING)
+                    .accessibilityAddTraits(selected == SEVENDAYS ? 
.isSelected : [])
                     .disabled(!isEnabled || maxExpiration < SEVENDAYS)
 
                 Button(action: thirtyDayAction) {
@@ -70,7 +68,7 @@ struct SelectDays: View {
                         Text("\(THIRTYDAYS) Days", comment: "30 Days, always 
plural (10..30), 4 letters max., abbreviate if longer")
                     }
                 }.buttonStyle(TalerButtonStyle(type: (selected == THIRTYDAYS) 
? .prominent : .bordered, dimmed: true))
-                    .accessibilityValue((selected == THIRTYDAYS) ? selectedStr 
: EMPTYSTRING)
+                    .accessibilityAddTraits(selected == THIRTYDAYS ? 
.isSelected : [])
                     .disabled(!isEnabled || maxExpiration < THIRTYDAYS)
             } // 3 buttons
         }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]