1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-29 12:45:20 +01:00

PM-1798 Fix voice over on buttons when adding new item from iOS extension (#2510)

This commit is contained in:
Federico Maccaroni 2023-05-05 20:18:01 +02:00 committed by GitHub
parent c1673a1bbf
commit bf463926a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,7 @@ namespace Bit.iOS.Core.Controllers
UsernameCell.TextField.ReturnKeyType = UIReturnKeyType.Next; UsernameCell.TextField.ReturnKeyType = UIReturnKeyType.Next;
UsernameCell.Button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f); UsernameCell.Button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f);
UsernameCell.Button.SetTitle(BitwardenIcons.Generate, UIControlState.Normal); UsernameCell.Button.SetTitle(BitwardenIcons.Generate, UIControlState.Normal);
UsernameCell.Button.AccessibilityLabel = AppResources.GenerateUsername;
UsernameCell.Button.TouchUpInside += (sender, e) => UsernameCell.Button.TouchUpInside += (sender, e) =>
{ {
LaunchUsernameGeneratorFlow(); LaunchUsernameGeneratorFlow();
@ -86,6 +87,7 @@ namespace Bit.iOS.Core.Controllers
PasswordCell.TextField.ReturnKeyType = UIReturnKeyType.Next; PasswordCell.TextField.ReturnKeyType = UIReturnKeyType.Next;
PasswordCell.Button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f); PasswordCell.Button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f);
PasswordCell.Button.SetTitle(BitwardenIcons.Generate, UIControlState.Normal); PasswordCell.Button.SetTitle(BitwardenIcons.Generate, UIControlState.Normal);
PasswordCell.Button.AccessibilityLabel = AppResources.GeneratePassword;
PasswordCell.Button.TouchUpInside += (sender, e) => PasswordCell.Button.TouchUpInside += (sender, e) =>
{ {
PerformSegue("passwordGeneratorSegue", this); PerformSegue("passwordGeneratorSegue", this);

View File

@ -1,4 +1,5 @@
using System; using System;
using Bit.App.Resources;
using Bit.Core; using Bit.Core;
using Bit.iOS.Core.Controllers; using Bit.iOS.Core.Controllers;
using Bit.iOS.Core.Utilities; using Bit.iOS.Core.Utilities;
@ -171,10 +172,13 @@ namespace Bit.iOS.Core.Views
var button = useSecondaryButton ? SecondButton : Button; var button = useSecondaryButton ? SecondButton : Button;
button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f); button.TitleLabel.Font = UIFont.FromName("bwi-font", 28f);
button.SetTitle(BitwardenIcons.Eye, UIControlState.Normal); button.SetTitle(BitwardenIcons.Eye, UIControlState.Normal);
button.AccessibilityLabel = AppResources.ToggleVisibility;
button.AccessibilityHint = AppResources.PasswordIsNotVisibleTapToShow;
button.TouchUpInside += (sender, e) => button.TouchUpInside += (sender, e) =>
{ {
TextField.SecureTextEntry = !TextField.SecureTextEntry; TextField.SecureTextEntry = !TextField.SecureTextEntry;
button.SetTitle(TextField.SecureTextEntry ? BitwardenIcons.Eye : BitwardenIcons.EyeSlash, UIControlState.Normal); button.SetTitle(TextField.SecureTextEntry ? BitwardenIcons.Eye : BitwardenIcons.EyeSlash, UIControlState.Normal);
button.AccessibilityHint = TextField.SecureTextEntry ? AppResources.PasswordIsNotVisibleTapToShow : AppResources.PasswordIsVisibleTapToHide;
}; };
} }