Skip to content

Commit

Permalink
chore(a11y): DeleteAccountActionSheetContent (#6047)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: OtavioStasiak <[email protected]>
  • Loading branch information
OtavioStasiak and OtavioStasiak authored Jan 8, 2025
1 parent b938b0d commit ac6b8ca
Show file tree
Hide file tree
Showing 28 changed files with 95 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ import { useActionSheet } from '../Provider';

const styles = StyleSheet.create({
subtitleText: {
fontSize: 14,
...sharedStyles.textRegular,
marginBottom: 10
fontSize: 16,
lineHeight: 24
},
buttonSeparator: {
marginRight: 8
marginRight: 12
},
footerButtonsContainer: {
flexDirection: 'row',
paddingTop: 16
},
titleContainerText: {
...sharedStyles.textBold,
fontSize: 16,
...sharedStyles.textSemibold
lineHeight: 24
},
titleContainer: {
paddingRight: 80,
marginBottom: 16,
marginBottom: 12,
flexDirection: 'row',
alignItems: 'center'
}
Expand All @@ -53,8 +54,8 @@ const FooterButtons = ({
styles.buttonSeparator,
{ flex: 1, backgroundColor: cancelBackgroundColor || colors.buttonBackgroundSecondaryDefault }
]}
color={colors.backdropColor}
title={cancelTitle}
color={colors.buttonFontSecondary}
onPress={cancelAction}
testID={`${testID}-cancel`}
/>
Expand Down Expand Up @@ -120,7 +121,6 @@ const ActionSheetContentWithInputAndSubmit = ({
<FormTextInput
key={inputConfig.key}
value={inputValues[index]}
placeholder={inputConfig.placeholder}
onChangeText={value => handleInputChange(value, index)}
onSubmitEditing={() => {
if (index < inputs.length - 1) {
Expand All @@ -143,17 +143,18 @@ const ActionSheetContentWithInputAndSubmit = ({
return (
<FormTextInput
value={inputValues[0]}
placeholder={placeholder}
onChangeText={value => handleInputChange(value, 0)}
onSubmitEditing={() => {
setTimeout(() => {
hideActionSheet();
}, 100);
if (inputValues[0]) onSubmit(inputValues[0]);
}}
accessibilityLabel={placeholder}
testID={`${testID}-input`}
secureTextEntry={secureTextEntry}
bottomSheet={isIOS}
containerStyle={{ marginTop: 12, marginBottom: 36 }}
/>
);
};
Expand All @@ -164,9 +165,9 @@ const ActionSheetContentWithInputAndSubmit = ({
return (
<View style={sharedStyles.containerScrollView} testID='action-sheet-content-with-input-and-submit'>
<>
<View style={styles.titleContainer}>
<View accessible accessibilityLabel={title} style={styles.titleContainer}>
{iconName ? <CustomIcon name={iconName} size={32} color={iconColor || colors.buttonBackgroundDangerDefault} /> : null}
<Text style={[styles.titleContainerText, { color: colors.fontDefault, paddingLeft: iconName ? 16 : 0 }]}>{title}</Text>
<Text style={[styles.titleContainerText, { color: colors.fontDefault, paddingLeft: iconName ? 12 : 0 }]}>{title}</Text>
</View>
{description ? <Text style={[styles.subtitleText, { color: colors.fontTitlesLabels }]}>{description}</Text> : null}
{customText}
Expand Down
8 changes: 6 additions & 2 deletions app/containers/TextInput/FormTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const FormTextInput = ({
const [showPassword, setShowPassword] = useState(false);
const showClearInput = onClearInput && value && value.length > 0;
const Input = bottomSheet ? BottomSheetTextInput : TextInput;

return (
<View
accessible
Expand All @@ -109,7 +110,7 @@ export const FormTextInput = ({
</Text>
) : null}

<View style={styles.wrap}>
<View accessible style={styles.wrap}>
<Input
style={[
styles.input,
Expand Down Expand Up @@ -167,7 +168,10 @@ export const FormTextInput = ({
) : null}

{secureTextEntry ? (
<Touchable onPress={() => setShowPassword(!showPassword)} style={[styles.iconContainer, styles.iconRight]}>
<Touchable
accessible
accessibilityLabel={showPassword ? i18n.t('Hide_Password') : i18n.t('Show_Password')}
onPress={() => setShowPassword(!showPassword)}>
<CustomIcon
name={showPassword ? 'unread-on-top' : 'unread-on-top-disabled'}
testID={testID ? `${testID}-icon-password` : undefined}
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"Get_help": "احصل على المساعدة",
"Glossary_of_simplified_terms": "مسرد المصطلحات المبسطة",
"Help": "مساعدة",
"Hide_Password": "إخفاء كلمة المرور",
"Hide_room": "إخفاء",
"Hide_System_Messages": "إخفاء رسائل النظام",
"Hide_type_messages": "إخفاء رسائل \"{{type}}\"",
Expand Down Expand Up @@ -411,6 +412,7 @@
"Share_Link": "مشاركة رابط",
"Share_this_app": "مشاركة هذا البرنامج",
"Show_more": "إظهار أكثر",
"Show_Password": "عرض كلمة المرور",
"Show_the_keyboard_shortcut_list": "عرض قائمة اختصارات لوحة المفاتيح",
"Sign_Up": "تسجيل جديد",
"Slash_Gimme_Description": "يعرض ༼ つ ◕_◕ ༽つ قبل رسالتك",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"Group_by": "দ্বারা গ্রুপ করুন",
"Has_left_the_team": "দল ছেড়ে দিয়েছে",
"Help": "সাহায্য",
"Hide_Password": "পাসওয়ার্ড লুকান",
"Hide_System_Messages": "সিস্টেম বার্তা লুকান",
"Hide_type_messages": "\"{{type}}\" বার্তা লুকান",
"How_It_Works": "এটি কীভাবে কাজ করে",
Expand Down Expand Up @@ -625,6 +626,7 @@
"Show_badge_for_mentions": "উল্লেখের জন্য ব্যাজ দেখান",
"Show_badge_for_mentions_Info": "মুখ্য উল্লেখের জন্য শুধুমাত্র ব্যাজ প্রদর্শন করুন",
"Show_more": "আরও দেখুন..",
"Show_Password": "পাসওয়ার্ড দেখান",
"Sign_Up": "নিবন্ধন করুন",
"Skip": "অবগাহন",
"Sort_by": "দ্বারা সাজানো",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
"Group_by": "Skupina vytvořená",
"Has_left_the_team": "opustil tým",
"Help": "Pomoc",
"Hide_Password": "Skrýt heslo",
"Hide_room": "Skrýt",
"Hide_System_Messages": "Skrýt systémové zprávy",
"Hide_type_messages": "Skrýt \"{{type}}\" zprávy",
Expand Down Expand Up @@ -676,6 +677,7 @@
"Show_badge_for_mentions_Info": "Zobrazit odznak pouze pro přímé zmínky",
"Show_less": "Ukaž méně",
"Show_more": "Zobrazit více",
"Show_Password": "Zobrazit heslo",
"Show_the_keyboard_shortcut_list": "Zobrazit seznam klávesových zkratek",
"Sign_Up": "Přihlásit se",
"Skip": "Přeskočit",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
"Group_by": "Gruppieren nach",
"Has_left_the_team": "Hat das Team verlassen",
"Help": "Hilfe",
"Hide_Password": "Passwort verbergen",
"Hide_room": "Raum verstecken",
"Hide_System_Messages": "Systemnachrichten ausblenden",
"Hide_type_messages": "\"{{type}}\"-Nachrichten ausblenden",
Expand Down Expand Up @@ -611,6 +612,7 @@
"Show_badge_for_mentions": "Zeige Abzeichen für Erwähnungen",
"Show_badge_for_mentions_Info": "Zeige Abzeichen nur für direkte Erwähnungen",
"Show_more": "Mehr anzeigen",
"Show_Password": "Passwort anzeigen",
"Show_the_keyboard_shortcut_list": "Liste der Tastenkombinationen anzeigen",
"Sign_Up": "Anmelden",
"Skip": "Überspringen",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
"Group_by": "Group by",
"Has_left_the_team": "has left the team",
"Help": "Help",
"Hide_Password": "Hide Password",
"Hide_room": "Hide",
"Hide_System_Messages": "Hide system messages",
"Hide_type_messages": "Hide \"{{type}}\" messages",
Expand Down Expand Up @@ -706,6 +707,7 @@
"Show_badge_for_mentions_Info": "Display badge for direct mentions only",
"Show_less": "Show less",
"Show_more": "Show more",
"Show_Password": "Show Password",
"Show_the_keyboard_shortcut_list": "Show the keyboard shortcut list",
"Sign_Up": "Sign up",
"Skip": "Skip",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"Get_link": "Obtener enlace",
"Glossary_of_simplified_terms": "Glosario de términos simplificados",
"Help": "Ayuda",
"Hide_Password": "Ocultar contraseña",
"Hide_room": "Ocultar",
"In_App_And_Desktop": "En la aplicación y en el escritorio",
"In_App_and_Desktop_Alert_info": "Muestra un banner en la parte superior de la pantalla cuando la aplicación esté abierta y muestra una notificación en el escritorio",
Expand Down Expand Up @@ -249,6 +250,7 @@
"Settings_succesfully_changed": "¡Configuración cambiada correctamente!",
"Share": "Compartir",
"Share_this_app": "Compartir esta aplicación",
"Show_Password": "Mostrar contraseña",
"Show_the_keyboard_shortcut_list": "Mostrar la lista de atajos de teclado",
"Sign_Up": "Registrarse",
"Slash_Gimme_Description": "Muestra (つ ◕_◕) つ antes de tu mensaje",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
"Group_by": "Ryhmittelyperuste",
"Has_left_the_team": "on poistunut tiimistä",
"Help": "Apua",
"Hide_Password": "Piilota salasana",
"Hide_room": "Piilota",
"Hide_System_Messages": "Piilota järjestelmäilmoitukset",
"Hide_type_messages": "Piilota \"{{type}}\"-viestit",
Expand Down Expand Up @@ -586,6 +587,7 @@
"Show_badge_for_mentions": "Näytä mainintojen merkki",
"Show_badge_for_mentions_Info": "Näytä vain suorien mainintojen merkki",
"Show_more": "Näytä lisää",
"Show_Password": "Näytä salasana",
"Show_the_keyboard_shortcut_list": "Näytä pikanäppäinten luettelo",
"Sign_Up": "Rekisteröidy",
"Skip": "Ohita",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
"Group_by": "Grouper par",
"Has_left_the_team": "a quitté l'équipe",
"Help": "Aide",
"Hide_Password": "Masquer le mot de passe",
"Hide_room": "Masquer",
"Hide_System_Messages": "Masquer les messages système",
"Hide_type_messages": "Masquer les messages \"{{type}}\"",
Expand Down Expand Up @@ -526,6 +527,7 @@
"Sharing": "Partager",
"Shortcut": "Raccourci",
"Show_more": "Afficher plus",
"Show_Password": "Afficher le mot de passe",
"Show_the_keyboard_shortcut_list": "Afficher la liste des raccourcis clavier",
"Sign_Up": "S'inscrire",
"Slash_Gimme_Description": "Affiche ༼ つ ◕_◕ ༽つ avant votre message",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"Group_by": "इसके अनुसार समूहीकृत करें",
"Has_left_the_team": "टीम छोड़ गया है",
"Help": "मदद",
"Hide_Password": "पासवर्ड छुपाएं",
"Hide_System_Messages": "सिस्टम संदेश छुपाएं",
"Hide_type_messages": "\"{{type}}\" संदेश छुपाएं",
"How_It_Works": "यह कैसे काम करता है",
Expand Down Expand Up @@ -625,6 +626,7 @@
"Show_badge_for_mentions": "उल्लेख के लिए बैज दिखाएं",
"Show_badge_for_mentions_Info": "केवल सीधे उल्लेखों के लिए बैज दिखाएं",
"Show_more": "और दिखाएं..",
"Show_Password": "पासवर्ड दिखाएं",
"Sign_Up": "साइन अप",
"Skip": "छोड़ें",
"Sort_by": "इसके अनुसार क्रमबद्ध करें",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"Group_by": "Csoportosítás",
"Has_left_the_team": "elhagyta a csapatot",
"Help": "Segítség",
"Hide_Password": "Jelszó elrejtése",
"Hide_System_Messages": "Rendszerüzenetek elrejtése",
"Hide_type_messages": "\"{{type}}\" üzenetek elrejtése",
"How_It_Works": "Hogyan működik",
Expand Down Expand Up @@ -626,6 +627,7 @@
"Show_badge_for_mentions": "Említések jelvényének megjelenítése",
"Show_badge_for_mentions_Info": "Jelvény megjelenítése csak a közvetlen említéseknél",
"Show_more": "Több megjelenítése..",
"Show_Password": "Jelszó megjelenítése",
"Sign_Up": "Feliratkozás",
"Skip": "Kihagyás",
"Sort_by": "Rendezés",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
"Glossary_of_simplified_terms": "Glossario dei termini semplificati",
"Has_left_the_team": "Ha lasciato il team",
"Help": "Aiuto",
"Hide_Password": "Nascondi Password",
"Hide_room": "Nascondi il canale",
"Hide_System_Messages": "Nascondi messaggi di sistema",
"Hide_type_messages": "Nascondi messaggi di \"{{type}}\"",
Expand Down Expand Up @@ -446,6 +447,7 @@
"Share_Link": "Condividi link",
"Share_this_app": "Condividi questa app",
"Show_more": "Mostra altri",
"Show_Password": "Mostra password",
"Show_the_keyboard_shortcut_list": "Mostra l'elenco delle scorciatoie per la tastiera",
"Sign_Up": "Registrati",
"Slash_Gimme_Description": "Displays ༼ つ ◕_◕ ༽つ before your message",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
"Glossary_of_simplified_terms": "簡易用語集",
"Has_left_the_team": "チームを退出しました",
"Help": "助け",
"Hide_Password": "パスワードを隠す",
"Hide_room": "ルームを非表示",
"Hide_System_Messages": "システムメッセージを非表示にする",
"Hide_type_messages": "\"{{type}}\"メッセージを非表示にする",
Expand Down Expand Up @@ -348,6 +349,7 @@
"Share": "シェア",
"Share_Link": "リンクをシェアする",
"Share_this_app": "このアプリをシェアする",
"Show_Password": "パスワードを表示",
"Show_the_keyboard_shortcut_list": "キーボードショートカットリストを表示",
"Sign_Up": "登録",
"Slash_Gimme_Description": "メッセージの前に༼ つ ◕_◕ ༽つを表示",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
"Group_by": "Groeperen op",
"Has_left_the_team": "heeft het team verlaten",
"Help": "Hulp",
"Hide_Password": "Wachtwoord verbergen",
"Hide_room": "Kamer verbergen",
"Hide_System_Messages": "Verberg systeemberichten",
"Hide_type_messages": "Verberg \"{{type}}\" berichten",
Expand Down Expand Up @@ -526,6 +527,7 @@
"Sharing": "Delen",
"Shortcut": "Snelkoppeling",
"Show_more": "Meer tonen",
"Show_Password": "Toon wachtwoord",
"Show_the_keyboard_shortcut_list": "Toon de lijst met sneltoetsen",
"Sign_Up": "Registreren",
"Slash_Gimme_Description": "Geeft ༼ つ ◕_◕ ༽つ weer voor uw bericht",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@
"Group_by": "Agrupar por",
"Has_left_the_team": "saiu do time",
"Help": "Ajuda",
"Hide_Password": "Ocultar senha",
"Hide_room": "Ocultar",
"Hide_System_Messages": "Esconder mensagens do sistema",
"Hide_type_messages": "Esconder mensagens de \"{{type}}\"",
Expand Down Expand Up @@ -684,6 +685,7 @@
"Show_badge_for_mentions_Info": "Mostrar contador somente para menções diretas",
"Show_less": "Mostrar menos",
"Show_more": "Mostrar mais",
"Show_Password": "Mostrar senha",
"Show_the_keyboard_shortcut_list": "Mostrar a lista de atalhos de teclado",
"Sign_Up": "Registrar",
"Skip": "Pular",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"Get_link": "Obter Ligação",
"Glossary_of_simplified_terms": "Glossário de termos simplificados",
"Help": "Ajuda",
"Hide_Password": "Ocultar Palavra-passe",
"Hide_room": "Esconder sala",
"Hide_System_Messages": "Esconder mensagens do sistema",
"Hide_type_messages": "Esconder mensagens \"{{type}}\"",
Expand Down Expand Up @@ -340,6 +341,7 @@
"Settings": "Definições",
"Settings_succesfully_changed": "Definições guardadas com sucesso!",
"Share": "Partilhar",
"Show_Password": "Mostrar Palavra-passe",
"Show_the_keyboard_shortcut_list": "Exibe a lista de atalhos do teclado",
"Sign_Up": "Inscreva-se",
"Slash_Gimme_Description": "Mostra (つ ◕_◕) つ antes de sua mensagem",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
"Group_by": "Группировка",
"Has_left_the_team": "покинул Команду",
"Help": "Помощь",
"Hide_Password": "Скрыть пароль",
"Hide_room": "Скрыть комнату",
"Hide_System_Messages": "Скрыть Системные Сообщения",
"Hide_type_messages": "Скрыть \"{{type}}\" сообщения",
Expand Down Expand Up @@ -563,6 +564,7 @@
"Show_badge_for_mentions": "Показать значок для упоминаний",
"Show_badge_for_mentions_Info": "Отображение значка только для прямых упоминаний",
"Show_more": "Показать больше",
"Show_Password": "Показать пароль",
"Show_the_keyboard_shortcut_list": "Показывать список горячих клавиш",
"Sign_Up": "Регистрация",
"Skip": "Пропустить",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
"Group_by": "Skupina po",
"Has_left_the_team": "je zapustil ekipo",
"Help": "Pomoč",
"Hide_Password": "Skrij geslo",
"Hide_room": "Skrij sobo",
"Hide_System_Messages": "Skrij sistemska sporočila",
"Hide_type_messages": "Skrij sporočila \"{{type}}\"",
Expand Down Expand Up @@ -542,6 +543,7 @@
"Show_badge_for_mentions": "Pokažite značko za omembe",
"Show_badge_for_mentions_Info": "Prikaz značke samo za neposredne omembe",
"Show_more": "Prikaži več",
"Show_Password": "Pokaži geslo",
"Show_the_keyboard_shortcut_list": "Prikaži seznam bližnjic na tipkovnici",
"Sign_Up": "Prijavite se",
"Slash_Gimme_Description": "Prikaže ༼ つ ◕_◕ ༽つ pred vašim sporočilom",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
"Group_by": "Gruppera per",
"Has_left_the_team": "har lämnat kanalen",
"Help": "Hjälp",
"Hide_Password": "Dölj lösenord",
"Hide_room": "Dölj rum",
"Hide_System_Messages": "Dölj systemmeddelanden",
"Hide_type_messages": "Dölj meddelanden av typen {{type}}",
Expand Down Expand Up @@ -585,6 +586,7 @@
"Show_badge_for_mentions": "Visa märke för omnämnanden",
"Show_badge_for_mentions_Info": "Visa endast märke för direkta omnämnanden",
"Show_more": "Visa mer",
"Show_Password": "Visa lösenord",
"Show_the_keyboard_shortcut_list": "Visa genvägslistan för tangentbordet",
"Sign_Up": "Registrera dig",
"Skip": "Hoppa över",
Expand Down
Loading

0 comments on commit ac6b8ca

Please sign in to comment.