Skip to content
Snippets Groups Projects
Commit 0caf3b58 authored by Alexender White's avatar Alexender White Committed by Kateryna Kostiuk
Browse files

accessibility: settings

Change-Id: I35d5a3f438d53311483a1ee527837de32b9ab597
parent 9dda1ba6
No related branches found
No related tags found
No related merge requests found
Showing
with 153 additions and 132 deletions
...@@ -31,6 +31,14 @@ internal enum L10n { ...@@ -31,6 +31,14 @@ internal enum L10n {
internal enum Accessibility { internal enum Accessibility {
/// About Jami /// About Jami
internal static let aboutJamiTitle = L10n.tr("Localizable", "accessibility.aboutJamiTitle", fallback: "About Jami") internal static let aboutJamiTitle = L10n.tr("Localizable", "accessibility.aboutJamiTitle", fallback: "About Jami")
/// Double-tap to edit your profile
internal static let accountSummaryEditProfileHint = L10n.tr("Localizable", "accessibility.accountSummaryEditProfileHint", fallback: "Double-tap to edit your profile")
/// Settings
internal static let accountSummaryEditSettingsButton = L10n.tr("Localizable", "accessibility.accountSummaryEditSettingsButton", fallback: "Settings")
/// QR Code
internal static let accountSummaryQrCode = L10n.tr("Localizable", "accessibility.accountSummaryQrCode", fallback: "QR Code")
/// Double-tap to view your account QR code
internal static let accountSummaryQrCodeHint = L10n.tr("Localizable", "accessibility.accountSummaryQrCodeHint", fallback: "Double-tap to view your account QR code")
/// Close /// Close
internal static let close = L10n.tr("Localizable", "accessibility.close", fallback: "Close") internal static let close = L10n.tr("Localizable", "accessibility.close", fallback: "Close")
/// Enter a username to verify if it's available /// Enter a username to verify if it's available
...@@ -47,6 +55,14 @@ internal enum L10n { ...@@ -47,6 +55,14 @@ internal enum L10n {
} }
/// Switch account /// Switch account
internal static let smartListSwitchAccounts = L10n.tr("Localizable", "accessibility.smartListSwitchAccounts", fallback: "Switch account") internal static let smartListSwitchAccounts = L10n.tr("Localizable", "accessibility.smartListSwitchAccounts", fallback: "Switch account")
/// Group picture
internal static let swarmPicturePicker = L10n.tr("Localizable", "accessibility.swarmPicturePicker", fallback: "Group picture")
/// Double-tap to take a picture or select a picture from the library
internal static let swarmPicturePickerHint = L10n.tr("Localizable", "accessibility.swarmPicturePickerHint", fallback: "Double-tap to take a picture or select a picture from the library")
/// Off
internal static let switchButtonIsOff = L10n.tr("Localizable", "accessibility.switchButtonIsOff", fallback: "Off")
/// On
internal static let switchButtonIsOn = L10n.tr("Localizable", "accessibility.switchButtonIsOn", fallback: "On")
/// Welcome to Jami /// Welcome to Jami
internal static let welcomeToJamiTitle = L10n.tr("Localizable", "accessibility.welcomeToJamiTitle", fallback: "Welcome to Jami") internal static let welcomeToJamiTitle = L10n.tr("Localizable", "accessibility.welcomeToJamiTitle", fallback: "Welcome to Jami")
} }
......
...@@ -324,3 +324,23 @@ private struct AccessibilityFocusModifier: ViewModifier { ...@@ -324,3 +324,23 @@ private struct AccessibilityFocusModifier: ViewModifier {
} }
} }
} }
struct ToggleCell: View {
let toggleText: String
let getAction: () -> Bool
let setAction: (Bool) -> Void
var body: some View {
HStack {
Text(toggleText)
Spacer()
Toggle("", isOn: Binding(
get: { getAction() },
set: { newValue in setAction(newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
.accessibilityElement(children: .combine)
}
}
...@@ -30,16 +30,11 @@ struct CallSettingsView: View { ...@@ -30,16 +30,11 @@ struct CallSettingsView: View {
var body: some View { var body: some View {
List { List {
Section { Section {
HStack { ToggleCell(
Text(L10n.AccountPage.callsFromUnknownContacts) toggleText: L10n.AccountPage.callsFromUnknownContacts,
Spacer() getAction: { model.callsFromUnknownContacts },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableCallsFromUnknownContacts(enable: newValue) }
get: { model.callsFromUnknownContacts }, )
set: { newValue in model.enableCallsFromUnknownContacts(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
} }
} }
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
...@@ -57,30 +52,21 @@ struct NotificationsSettingsView: View { ...@@ -57,30 +52,21 @@ struct NotificationsSettingsView: View {
var body: some View { var body: some View {
List { List {
Section(footer: notificationsFooterView()) { Section(footer: notificationsFooterView()) {
HStack { ToggleCell(
Text(L10n.AccountPage.enableNotifications) toggleText: L10n.AccountPage.enableNotifications,
Spacer() getAction: { model.proxyEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableNotifications(enable: newValue) }
get: { model.proxyEnabled }, )
set: { newValue in model.enableNotifications(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
} }
if model.proxyEnabled { if model.proxyEnabled {
Section(header: Text(L10n.AccountPage.proxyHeader), footer: Text(L10n.AccountPage.proxyExplanation)) { Section(header: Text(L10n.AccountPage.proxyHeader), footer: Text(L10n.AccountPage.proxyExplanation)) {
HStack { ToggleCell(
Text(L10n.AccountPage.useProxyList) toggleText: L10n.AccountPage.useProxyList,
Spacer() getAction: { model.proxyListEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableProxyList(enable: newValue) }
get: { model.proxyListEnabled }, )
set: { newValue in model.enableProxyList(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
if model.proxyListEnabled { if model.proxyListEnabled {
NavigationLink(destination: EditableFieldView(value: $model.proxyListUrl, title: L10n.AccountPage.proxyListURL, placeholder: L10n.AccountPage.proxyListURL, onDisappearAction: { NavigationLink(destination: EditableFieldView(value: $model.proxyListUrl, title: L10n.AccountPage.proxyListURL, placeholder: L10n.AccountPage.proxyListURL, onDisappearAction: {
model.saveProxyListUrl() model.saveProxyListUrl()
...@@ -156,16 +142,12 @@ struct ConnectivitySettingsView: View { ...@@ -156,16 +142,12 @@ struct ConnectivitySettingsView: View {
List { List {
if model.account.type == .sip { if model.account.type == .sip {
Section { Section {
HStack { ToggleCell(
Text(L10n.AccountPage.autoRegistration) toggleText: L10n.AccountPage.autoRegistration,
Spacer() getAction: { model.autoRegistrationEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableaAtoregister(enable: newValue) }
get: { model.autoRegistrationEnabled }, )
set: { newValue in model.enableaAtoregister(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
NavigationLink(destination: EditExpirationtime(expirationtime: $model.autoRegistrationExpirationTime, onDisappearAction: { NavigationLink(destination: EditExpirationtime(expirationtime: $model.autoRegistrationExpirationTime, onDisappearAction: {
model.setExpirationTime() model.setExpirationTime()
})) { })) {
...@@ -193,16 +175,11 @@ struct ConnectivitySettingsView: View { ...@@ -193,16 +175,11 @@ struct ConnectivitySettingsView: View {
FieldRowView(label: L10n.AccountPage.bootstrap, value: model.bootstrap) FieldRowView(label: L10n.AccountPage.bootstrap, value: model.bootstrap)
} }
VStack(alignment: .leading) { VStack(alignment: .leading) {
HStack { ToggleCell(
Text(L10n.AccountPage.peerDiscovery) toggleText: L10n.AccountPage.peerDiscovery,
Spacer() getAction: { model.peerDiscovery },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enablePeerDiscovery(enable: newValue) }
get: { model.peerDiscovery }, )
set: { newValue in model.enablePeerDiscovery(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
Text(L10n.AccountPage.peerDiscoveryExplanation) Text(L10n.AccountPage.peerDiscoveryExplanation)
.font(.footnote) .font(.footnote)
.foregroundColor(Color(UIColor.secondaryLabel)) .foregroundColor(Color(UIColor.secondaryLabel))
...@@ -212,27 +189,17 @@ struct ConnectivitySettingsView: View { ...@@ -212,27 +189,17 @@ struct ConnectivitySettingsView: View {
func connectivityView() -> some View { func connectivityView() -> some View {
Section(header: Text(L10n.AccountPage.connectivityHeader)) { Section(header: Text(L10n.AccountPage.connectivityHeader)) {
HStack { ToggleCell(
Text(L10n.AccountPage.upnpEnabled) toggleText: L10n.AccountPage.upnpEnabled,
Spacer() getAction: { model.upnpEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableUpnp(enable: newValue) }
get: { model.upnpEnabled }, )
set: { newValue in model.enableUpnp(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
HStack { ToggleCell(
Text(L10n.AccountPage.turnEnabled) toggleText: L10n.AccountPage.turnEnabled,
Spacer() getAction: { model.turnEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableTurn(enable: newValue) }
get: { model.turnEnabled }, )
set: { newValue in model.enableTurn(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
if model.turnEnabled { if model.turnEnabled {
NavigationLink(destination: EditableFieldView(value: $model.turnServer, title: L10n.AccountPage.turnServer, placeholder: L10n.AccountPage.turnServer, onDisappearAction: { NavigationLink(destination: EditableFieldView(value: $model.turnServer, title: L10n.AccountPage.turnServer, placeholder: L10n.AccountPage.turnServer, onDisappearAction: {
...@@ -272,16 +239,11 @@ struct SecuritySettingsView: View { ...@@ -272,16 +239,11 @@ struct SecuritySettingsView: View {
var body: some View { var body: some View {
List { List {
Section { Section {
HStack { ToggleCell(
Text(L10n.AccountPage.enableSRTP) toggleText: L10n.AccountPage.enableSRTP,
Spacer() getAction: { model.enableSRTP },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableSRTP(enable: newValue) }
get: { model.enableSRTP }, )
set: { newValue in model.enableSRTP(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
} }
} }
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
......
...@@ -47,16 +47,11 @@ struct AccountSummaryView: View { ...@@ -47,16 +47,11 @@ struct AccountSummaryView: View {
profileSection() profileSection()
Section(header: Text(L10n.AccountPage.accountHeader)) { Section(header: Text(L10n.AccountPage.accountHeader)) {
HStack { ToggleCell(
Text(model.accountStatus) toggleText: L10n.Account.statusOnline,
Spacer() getAction: { model.accountEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableAccount(enable: newValue) }
get: { model.accountEnabled }, )
set: { newValue in model.enableAccount(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
} }
if model.account.type == .sip { if model.account.type == .sip {
...@@ -98,6 +93,7 @@ struct AccountSummaryView: View { ...@@ -98,6 +93,7 @@ struct AccountSummaryView: View {
NavigationLink(destination: SettingsSummaryView(model: model)) { NavigationLink(destination: SettingsSummaryView(model: model)) {
Image(systemName: "gearshape.fill") Image(systemName: "gearshape.fill")
.foregroundColor(.jamiColor) .foregroundColor(.jamiColor)
.accessibilityLabel(L10n.Accessibility.accountSummaryEditSettingsButton)
}) })
} }
...@@ -110,20 +106,27 @@ struct AccountSummaryView: View { ...@@ -110,20 +106,27 @@ struct AccountSummaryView: View {
.conditionalTextSelection() .conditionalTextSelection()
.truncationMode(.middle) .truncationMode(.middle)
.lineLimit(1) .lineLimit(1)
.accessibilityHidden(true)
Spacer() Spacer()
.frame(width: 15) .frame(width: 15)
Spacer() Spacer()
Button(action: {
showQRcode = true
}, label: {
Image(systemName: "qrcode") Image(systemName: "qrcode")
.resizable() .resizable()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)
.frame(width: 18, height: 18) .frame(width: 18, height: 18)
.foregroundColor(.jamiColor) .foregroundColor(.jamiColor)
.onTapGesture { })
showQRcode = true
}
.sheet(isPresented: $showQRcode) { .sheet(isPresented: $showQRcode) {
QRCodeView(isPresented: $showQRcode, jamiId: model.jamiId) QRCodeView(isPresented: $showQRcode, jamiId: model.jamiId)
} }
.accessibilityLabel(L10n.Accessibility.accountSummaryQrCode)
.accessibilityHint(L10n.Accessibility.accountSummaryQrCodeHint)
.buttonStyle(PlainButtonStyle())
} }
.listRowBackground(Color(UIColor.secondarySystemGroupedBackground)) .listRowBackground(Color(UIColor.secondarySystemGroupedBackground))
} }
...@@ -147,6 +150,9 @@ struct AccountSummaryView: View { ...@@ -147,6 +150,9 @@ struct AccountSummaryView: View {
EditProfileView(accountModel: model, EditProfileView(accountModel: model,
isPresented: $showEditPrpofile) isPresented: $showEditPrpofile)
} }
.accessibilityElement(children: /*@START_MENU_TOKEN@*/.ignore/*@END_MENU_TOKEN@*/)
.accessibilityLabel(getProfileName())
.accessibilityHint(L10n.Accessibility.accountSummaryEditProfileHint)
} }
} }
...@@ -160,6 +166,14 @@ struct AccountSummaryView: View { ...@@ -160,6 +166,14 @@ struct AccountSummaryView: View {
} }
} }
func getProfileName() -> String {
if model.profileName.isEmpty {
return L10n.AccountPage.profileNameNotSelected
} else {
return model.profileName
}
}
func editProfileButton() -> some View { func editProfileButton() -> some View {
VStack { VStack {
Image(systemName: "pencil") Image(systemName: "pencil")
......
...@@ -65,6 +65,7 @@ struct EncryptAccount: View { ...@@ -65,6 +65,7 @@ struct EncryptAccount: View {
.listRowBackground(Color.clear) .listRowBackground(Color.clear)
.optionalRowSeparator(hidden: true) .optionalRowSeparator(hidden: true)
.listRowInsets(EdgeInsets(top: model.validationError == nil ? 15 : 5, leading: 0, bottom: 0, trailing: 0)) .listRowInsets(EdgeInsets(top: model.validationError == nil ? 15 : 5, leading: 0, bottom: 0, trailing: 0))
.accessibilityAutoFocusOnAppear()
if let errorMessage = model.encryptError { if let errorMessage = model.encryptError {
ErrorMessageView(errorMessage: errorMessage) ErrorMessageView(errorMessage: errorMessage)
......
...@@ -30,16 +30,11 @@ struct FileTransferSettingsView: View { ...@@ -30,16 +30,11 @@ struct FileTransferSettingsView: View {
var body: some View { var body: some View {
List { List {
Section { Section {
HStack { ToggleCell(
Text(L10n.GeneralSettings.automaticAcceptIncomingFiles) toggleText: L10n.GeneralSettings.automaticAcceptIncomingFiles,
Spacer() getAction: { model.automaticlyDownloadIncomingFiles },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableAutomaticlyDownload(enable: newValue) }
get: { model.automaticlyDownloadIncomingFiles }, )
set: { newValue in model.enableAutomaticlyDownload(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
if model.automaticlyDownloadIncomingFiles { if model.automaticlyDownloadIncomingFiles {
HStack { HStack {
Text(L10n.GeneralSettings.acceptTransferLimit) + Text(L10n.GeneralSettings.acceptTransferLimitDescription) Text(L10n.GeneralSettings.acceptTransferLimit) + Text(L10n.GeneralSettings.acceptTransferLimitDescription)
...@@ -54,6 +49,8 @@ struct FileTransferSettingsView: View { ...@@ -54,6 +49,8 @@ struct FileTransferSettingsView: View {
.disabled(!model.automaticlyDownloadIncomingFiles) .disabled(!model.automaticlyDownloadIncomingFiles)
.foregroundColor(model.automaticlyDownloadIncomingFiles ? .jamiColor : Color(UIColor.secondaryLabel)) .foregroundColor(model.automaticlyDownloadIncomingFiles ? .jamiColor : Color(UIColor.secondaryLabel))
} }
.accessibilityElement(children: /*@START_MENU_TOKEN@*/.ignore/*@END_MENU_TOKEN@*/)
.accessibilityLabel(L10n.GeneralSettings.acceptTransferLimit)
} }
} }
} }
...@@ -74,17 +71,11 @@ struct LocationSharingSettingsView: View { ...@@ -74,17 +71,11 @@ struct LocationSharingSettingsView: View {
ZStack { ZStack {
List { List {
Section { Section {
HStack { ToggleCell(
Text(L10n.GeneralSettings.limitLocationSharingDuration) toggleText: L10n.GeneralSettings.limitLocationSharingDuration,
.layoutPriority(1) getAction: { model.limitLocationSharing },
Spacer() setAction: { newValue in model.enableLocationSharingLimit(enable: newValue) }
Toggle("", isOn: Binding<Any>.customBinding( )
get: { model.limitLocationSharing },
set: { newValue in model.enableLocationSharingLimit(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
if model.limitLocationSharing { if model.limitLocationSharing {
HStack { HStack {
Text(L10n.GeneralSettings.limitLocationSharingDuration) Text(L10n.GeneralSettings.limitLocationSharingDuration)
...@@ -97,6 +88,8 @@ struct LocationSharingSettingsView: View { ...@@ -97,6 +88,8 @@ struct LocationSharingSettingsView: View {
showingDurationPicker = true showingDurationPicker = true
} }
} }
.accessibilityElement(children: /*@START_MENU_TOKEN@*/.ignore/*@END_MENU_TOKEN@*/)
.accessibilityLabel(L10n.GeneralSettings.limitLocationSharingDuration)
} }
} }
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
...@@ -132,16 +125,11 @@ struct VideoSettingsView: View { ...@@ -132,16 +125,11 @@ struct VideoSettingsView: View {
var body: some View { var body: some View {
List { List {
Section { Section {
HStack { ToggleCell(
Text(L10n.GeneralSettings.videoAcceleration) toggleText: L10n.GeneralSettings.videoAcceleration,
Spacer() getAction: { model.videoAccelerationEnabled },
Toggle("", isOn: Binding<Any>.customBinding( setAction: { newValue in model.enableVideoAcceleration(enable: newValue) }
get: { model.videoAccelerationEnabled }, )
set: { newValue in model.enableVideoAcceleration(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
} }
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.navigationTitle(L10n.Global.video) .navigationTitle(L10n.Global.video)
......
...@@ -96,6 +96,7 @@ struct LinkDeviceView: View { ...@@ -96,6 +96,7 @@ struct LinkDeviceView: View {
.resizable() .resizable()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)
.frame(width: 140, height: 140) .frame(width: 140, height: 140)
.accessibilityHidden(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
} }
HStack(spacing: 15) { HStack(spacing: 15) {
Image(systemName: "info.circle") Image(systemName: "info.circle")
...@@ -112,6 +113,9 @@ struct LinkDeviceView: View { ...@@ -112,6 +113,9 @@ struct LinkDeviceView: View {
.padding() .padding()
.background(Color.jamiTertiaryControl) .background(Color.jamiTertiaryControl)
.cornerRadius(12) .cornerRadius(12)
.accessibilityElement(children: .combine)
.accessibilityLabel(L10n.AccountPage.pinExplanationTitle + " " + L10n.AccountPage.pinExplanationMessage)
.accessibilityAutoFocusOnAppear()
HStack { HStack {
Spacer() Spacer()
......
...@@ -89,12 +89,14 @@ struct LinkedDevicesView: View { ...@@ -89,12 +89,14 @@ struct LinkedDevicesView: View {
.conditionalTextSelection() .conditionalTextSelection()
} else { } else {
FocusableTextField(text: $deviceName, isFirstResponder: $isFocused) FocusableTextField(text: $deviceName, isFirstResponder: $isFocused)
.accessibilityAutoFocusOnAppear()
} }
} }
Text(device.deviceId) Text(device.deviceId)
.font(.footnote) .font(.footnote)
.foregroundColor(Color(UIColor.secondaryLabel)) .foregroundColor(Color(UIColor.secondaryLabel))
.lineLimit(1) .lineLimit(1)
.accessibilityHidden(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
.conditionalTextSelection() .conditionalTextSelection()
} }
Spacer() Spacer()
......
...@@ -82,6 +82,7 @@ struct ManageAccountView: View { ...@@ -82,6 +82,7 @@ struct ManageAccountView: View {
Text(L10n.AccountPage.removeAccountMessage) Text(L10n.AccountPage.removeAccountMessage)
.font(.subheadline) .font(.subheadline)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.accessibilityAutoFocusOnAppear()
HStack { HStack {
Button(action: { Button(action: {
withAnimation { withAnimation {
......
...@@ -100,6 +100,7 @@ struct RevocationView: View { ...@@ -100,6 +100,7 @@ struct RevocationView: View {
VStack { VStack {
SwiftUI.ProgressView(L10n.AccountPage.deviceRevocationProgress) SwiftUI.ProgressView(L10n.AccountPage.deviceRevocationProgress)
.padding() .padding()
.accessibilityAutoFocusOnAppear()
} }
.frame(minWidth: 280, minHeight: 150) .frame(minWidth: 280, minHeight: 150)
} }
...@@ -110,6 +111,7 @@ struct RevocationView: View { ...@@ -110,6 +111,7 @@ struct RevocationView: View {
.font(.headline) .font(.headline)
Text(L10n.AccountPage.revokeDeviceMessage) Text(L10n.AccountPage.revokeDeviceMessage)
.font(.subheadline) .font(.subheadline)
.accessibilityAutoFocusOnAppear()
if model.hasPassword() { if model.hasPassword() {
PasswordFieldView(text: $password, placeholder: L10n.Global.enterPassword) PasswordFieldView(text: $password, placeholder: L10n.Global.enterPassword)
.textFieldStyleInAlert() .textFieldStyleInAlert()
......
...@@ -161,6 +161,7 @@ struct QRCodeView: View { ...@@ -161,6 +161,7 @@ struct QRCodeView: View {
.frame(width: 270, height: 270) .frame(width: 270, height: 270)
.cornerRadius(10) .cornerRadius(10)
.padding() .padding()
.accessibilityLabel(L10n.Accessibility.accountSummaryQrCode)
} }
Spacer() Spacer()
} }
...@@ -178,6 +179,8 @@ struct QRCodeView: View { ...@@ -178,6 +179,8 @@ struct QRCodeView: View {
image = jamiId.generateQRCode() image = jamiId.generateQRCode()
} }
.optionalMediumPresentationDetents() .optionalMediumPresentationDetents()
.accessibilityAutoFocusOnAppear()
} }
} }
......
...@@ -515,3 +515,11 @@ ...@@ -515,3 +515,11 @@
"accessibility.createAccountVerifyUsernamePrompt" = "Enter a username to verify if it's available"; "accessibility.createAccountVerifyUsernamePrompt" = "Enter a username to verify if it's available";
"accessibility.profilePicturePicker" = "Profile picture"; "accessibility.profilePicturePicker" = "Profile picture";
"accessibility.profilePicturePickerHint" = "Double-tap to take a picture or select a picture from the library"; "accessibility.profilePicturePickerHint" = "Double-tap to take a picture or select a picture from the library";
"accessibility.swarmPicturePicker" = "Group picture";
"accessibility.swarmPicturePickerHint" = "Double-tap to take a picture or select a picture from the library";
"accessibility.accountSummaryQrCode" = "QR Code";
"accessibility.accountSummaryQrCodeHint" = "Double-tap to view your account QR code";
"accessibility.accountSummaryEditProfileHint" = "Double-tap to edit your profile";
"accessibility.accountSummaryEditSettingsButton" = "Settings";
"accessibility.switchButtonIsOn" = "On";
"accessibility.switchButtonIsOff" = "Off";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment