Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(a11y): RoomInfoEditView #6023

Merged
merged 37 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
77356f2
chore: updated E2EEnterYourPasswordView layout
OtavioStasiak Nov 18, 2024
678d3b2
fix: added label on show and hide password input
OtavioStasiak Nov 22, 2024
8ed9726
action: organized translations
OtavioStasiak Nov 22, 2024
2483bf9
fix: label on closeButton
OtavioStasiak Nov 22, 2024
ed83e9a
fix: lint
OtavioStasiak Nov 22, 2024
c4ff9a6
fix: i18n translation
OtavioStasiak Dec 4, 2024
d32af7e
chore: updated room info edit layout
OtavioStasiak Nov 22, 2024
46e6ad7
chore: useTheme
OtavioStasiak Nov 25, 2024
3d3f837
fix: lint
OtavioStasiak Nov 25, 2024
69e20ac
chore: updated pt-br translation
OtavioStasiak Nov 25, 2024
2015eb0
fix: lint
OtavioStasiak Nov 25, 2024
1878a1f
chore: updated a11y labels
OtavioStasiak Nov 25, 2024
936ac25
fix: lint
OtavioStasiak Nov 25, 2024
5045e8b
chore: updated translation
OtavioStasiak Nov 26, 2024
a56fdbd
fix: toggle archive
OtavioStasiak Nov 26, 2024
c740b88
fix: e2e roomInfo iOS test
OtavioStasiak Nov 29, 2024
e43f790
fix: e2e room info and create team tests
OtavioStasiak Nov 29, 2024
c6aa07a
fix: roomInfo e2e test
OtavioStasiak Nov 29, 2024
0c1fcd2
fix: create team e2e test
OtavioStasiak Nov 30, 2024
9d8e077
fix: room info e2e test should change room name
OtavioStasiak Nov 30, 2024
0e1e35a
fix: room info e2e test roomInfo should reset form
OtavioStasiak Nov 30, 2024
5e2c99f
fix: room info e2e test create team
OtavioStasiak Nov 30, 2024
421de10
fix: updated swipe on create team
OtavioStasiak Nov 30, 2024
54838a3
fix: updated sleep time on should delete team
OtavioStasiak Dec 2, 2024
971921e
fix: should reset form e2e test
OtavioStasiak Dec 2, 2024
c7d1ebe
fix: createTeam iOS e2etest
OtavioStasiak Dec 2, 2024
a823cb7
fix: roomInfo e2e test
OtavioStasiak Dec 3, 2024
486f705
fix: lint
OtavioStasiak Dec 3, 2024
ce2d7c2
fix: comments on roomInfo e2e test
OtavioStasiak Dec 3, 2024
c83ce65
fix: a11y focus error on iOS
OtavioStasiak Dec 6, 2024
356baa4
action: organized translations
OtavioStasiak Dec 6, 2024
bd9e902
fix: changed accessibility separator to comma
OtavioStasiak Dec 10, 2024
05dead4
fix: improved experience on iOS accessibility
OtavioStasiak Dec 11, 2024
83cb261
fix: switch label
OtavioStasiak Dec 12, 2024
91c47a1
chore: removed a11y-order
OtavioStasiak Jan 7, 2025
6370b35
fix: added style on textInput show password button
OtavioStasiak Jan 8, 2025
fcf3264
Merge branch 'develop' into chore-a11y-edit-room-info
OtavioStasiak Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/containers/Avatar/AvatarWithEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import sharedStyles from '../../views/Styles';

const styles = StyleSheet.create({
editAvatarButton: {
marginTop: 8,
marginTop: 16,
paddingVertical: 8,
paddingHorizontal: 12,
marginBottom: 0,
Expand Down Expand Up @@ -67,6 +67,7 @@ const AvatarWithEdit = ({
/>
{handleEdit && serverVersion && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '3.6.0') ? (
<Button
accessibilityLabel={I18n.t('Edit_Room_Photo')}
title={I18n.t('Edit')}
type='secondary'
onPress={handleEdit}
Expand Down
14 changes: 10 additions & 4 deletions app/containers/TextInput/FormTextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BottomSheetTextInput } from '@discord/bottom-sheet';
import React, { useState } from 'react';
import { StyleProp, StyleSheet, Text, TextInput as RNTextInput, TextInputProps, TextStyle, View, ViewStyle } from 'react-native';
import { BottomSheetTextInput } from '@discord/bottom-sheet';
import Touchable from 'react-native-platform-touchable';

import i18n from '../../i18n';
Expand All @@ -9,6 +9,7 @@ import sharedStyles from '../../views/Styles';
import ActivityIndicator from '../ActivityIndicator';
import { CustomIcon, TIconsName } from '../CustomIcon';
import { TextInput } from './TextInput';
import { isIOS } from '../../lib/methods/helpers';

const styles = StyleSheet.create({
error: {
Expand Down Expand Up @@ -97,10 +98,12 @@ export const FormTextInput = ({
const [showPassword, setShowPassword] = useState(false);
const showClearInput = onClearInput && value && value.length > 0;
const Input = bottomSheet ? BottomSheetTextInput : TextInput;
const accessibilityLabelRequired = required ? `, ${i18n.t('Required')}` : '';
const accessibilityInputValue = (!secureTextEntry && value && isIOS) || showPassword ? `, ${value}` : '';
return (
<View
accessible
accessibilityLabel={`${label} - ${required ? i18n.t('Required') : ''}`}
accessibilityLabel={`${label}${accessibilityLabelRequired}${accessibilityInputValue}`}
style={[styles.inputContainer, containerStyle]}>
{label ? (
<Text style={[styles.label, { color: colors.fontTitlesLabels }, error?.error && { color: colors.fontDanger }]}>
Expand All @@ -109,7 +112,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 +170,10 @@ export const FormTextInput = ({
) : null}

{secureTextEntry ? (
<Touchable onPress={() => setShowPassword(!showPassword)} style={[styles.iconContainer, styles.iconRight]}>
<Touchable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

It rendering outside of TextInput

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
4 changes: 4 additions & 0 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"E2E_How_It_Works_info4": "بإمكانك أيضاً إنشاء كلمة مرور جديدة لمفتاح التشفير في أي وقت عند دخولك بكلمة المرور الحالية لمفتاح التشفير",
"Edit": "تعديل",
"Edit_Invite": "تعديل الدعوة",
"Edit_Room_Photo": "تحرير صورة غرفة",
"Edit_Status": "تعديل الحالة",
"Email": "البريد الإلكتروني",
"Email_Notification_Mode_All": "لكل إشارة أو رسالة مباشرة",
Expand Down Expand Up @@ -172,6 +173,7 @@
"Get_help": "احصل على المساعدة",
"Glossary_of_simplified_terms": "مسرد المصطلحات المبسطة",
"Help": "مساعدة",
"Hide_Password": "إخفاء كلمة المرور",
"Hide_room": "إخفاء",
"Hide_System_Messages": "إخفاء رسائل النظام",
"Hide_type_messages": "إخفاء رسائل \"{{type}}\"",
Expand Down Expand Up @@ -365,6 +367,7 @@
"Roles": "أدوار",
"Room_Info": "معلومات الغرفة",
"Room_Info_Edit": "تعديل معلومات الغرفة",
"Room_Password": "كلمة مرور الغرفة",
"SAVE": "حفظ",
"Save": "حفظ",
"Save_Changes": "حفظ التغيرات",
Expand Down Expand Up @@ -406,6 +409,7 @@
"Share_Link": "مشاركة رابط",
"Share_this_app": "مشاركة هذا البرنامج",
"Show_more": "إظهار أكثر",
"Show_Password": "إظهار كلمة المرور",
"Show_the_keyboard_shortcut_list": "عرض قائمة اختصارات لوحة المفاتيح",
"Sign_Up": "تسجيل جديد",
"Slash_Gimme_Description": "يعرض ༼ つ ◕_◕ ༽つ قبل رسالتك",
Expand Down
4 changes: 4 additions & 0 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@
"E2E_How_It_Works_info4": "আপনি যে কোনও ব্রাউজার থেকে একটি নতুন পাসওয়ার্ড সেটআপ করতে পারেন আপনার এনক্রিপশন কীর জন্য সময়ের মধ্যে যে কোনও ব্রাউজারে যাতে আপনি বর্তমানের E2E পাসওয়ার্ড দিয়ে এনটার করেছেন।",
"Edit": "সম্পাদনা করুন",
"Edit_Invite": "ইনভাইট সম্পাদনা করুন",
"Edit_Room_Photo": "ঘরের ছবি সম্পাদনা করুন",
"Edit_Status": "স্থিতি সম্পাদনা করুন",
"Email": "ইমেইল",
"Email_Notification_Mode_All": "প্রতি উল্লেখ / ডিএম",
Expand Down Expand Up @@ -286,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 @@ -562,6 +564,7 @@
"Room_Info_Edit": "রুম তথ্য সম্পাদনা",
"Room_name_changed_to": "রুম নাম পরিবর্তন করেছে: {{name}}",
"Room_not_found": "রুম পাওয়া যায়নি",
"Room_Password": "ঘরের পাসওয়ার্ড",
"room_removed_read_only_permission": "রিড ওনলি অনুমতি সরানো হয়েছে",
"room_set_read_only_permission": "রুমটি শুধুমাত্র পড়া হিসেবে সেট করা হয়েছে",
"room_unarchived": "আনআর্কাইভ করা রুম",
Expand Down Expand Up @@ -622,6 +625,7 @@
"Show_badge_for_mentions": "উল্লেখের জন্য ব্যাজ দেখান",
"Show_badge_for_mentions_Info": "মুখ্য উল্লেখের জন্য শুধুমাত্র ব্যাজ প্রদর্শন করুন",
"Show_more": "আরও দেখুন..",
"Show_Password": "পাসওয়ার্ড দেখান",
"Sign_Up": "নিবন্ধন করুন",
"Skip": "অবগাহন",
"Sort_by": "দ্বারা সাজানো",
Expand Down
10 changes: 7 additions & 3 deletions app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"announcement": "oznámení",
"App_users_are_not_allowed_to_log_in_directly": "Uživatelé aplikace se nemohou přihlásit přímo.",
"Apply_Certificate": "Použít certifikát",
"ARCHIVE": "ARCHIV",
"ARCHIVE": "Archiv",
"archive": "archiv",
"are_typing": "píšou",
"Are_you_sure_question_mark": "Jsi si jistá?",
Expand Down Expand Up @@ -239,6 +239,7 @@
"E2E_How_It_Works_info4": "Nové heslo pro svůj šifrovací klíč můžete také nastavit kdykoli z libovolného prohlížeče, kde jste zadali stávající heslo E2E.",
"Edit": "Upravit",
"Edit_Invite": "Upravit pozvánku",
"Edit_Room_Photo": "Upravit fotografii místnosti",
"Edit_Status": "Upravit stav",
"Email": "E-mailem",
"Email_Notification_Mode_All": "Každá zmínka/DM",
Expand Down Expand Up @@ -306,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 @@ -588,7 +590,7 @@
"Required": "Požadováno",
"Resend": "Přeposlat",
"Resend_email": "Přeposlat email",
"RESET": "RESETOVAT",
"RESET": "Resetovat",
"Reset_password": "Obnovit heslo",
"resetting_password": "resetování hesla",
"Resume": "Životopis",
Expand All @@ -612,6 +614,7 @@
"Room_Info_Edit": "Úprava informací o místnosti",
"Room_name_changed_to": "změnil název místnosti na: {{name}}",
"Room_not_found": "Pokoj nenalezen",
"Room_Password": "Heslo místnosti",
"room_removed_read_only_permission": "odstraněno oprávnění pouze pro čtení",
"room_set_read_only_permission": "nastavit místnost pouze pro čtení",
"room_unarchived": "nearchivovaná místnost",
Expand Down Expand Up @@ -673,6 +676,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 Expand Up @@ -743,7 +747,7 @@
"Two_Factor_Authentication": "Dvoufaktorové ověřování",
"Type_message": "Zadejte zprávu",
"Types": "Typy",
"UNARCHIVE": "UNARCHIVOVAT",
"UNARCHIVE": "Unarchivovat",
"unarchive": "zrušit archivaci",
"unauthorized": "Neoprávněný",
"Unblock": "Odblokovat",
Expand Down
10 changes: 7 additions & 3 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"Announcement": "Ankündigung",
"announcement": "Ankündigung",
"Apply_Certificate": "Zertifikat anwenden",
"ARCHIVE": "ARCHIV",
"ARCHIVE": "Archiv",
"archive": "Archiv",
"are_typing": "tippen",
"Are_you_sure_question_mark": "Sind Sie sicher?",
Expand Down Expand Up @@ -216,6 +216,7 @@
"E2E_How_It_Works_info4": "Sie können außerdem jederzeit, in jedem Browser, in dem Sie das bestehende Passwort eingegeben haben, ein neues Passwort setzen.",
"Edit": "Bearbeiten",
"Edit_Invite": "Einladung bearbeiten",
"Edit_Room_Photo": "Zimmerfoto bearbeiten",
"Edit_Status": "Status ändern",
"Email": "E-mail",
"Email_Notification_Mode_All": "Jede Erwähnung/Direktnachricht",
Expand Down Expand Up @@ -279,6 +280,7 @@
"Group_by": "Gruppieren nach",
"Has_left_the_team": "Hat das Team verlassen",
"Help": "Hilfe",
"Hide_Password": "Passwort ausblenden",
"Hide_room": "Raum verstecken",
"Hide_System_Messages": "Systemnachrichten ausblenden",
"Hide_type_messages": "\"{{type}}\"-Nachrichten ausblenden",
Expand Down Expand Up @@ -526,7 +528,7 @@
"Report": "Melden",
"Required": "Erforderlich",
"Resend": "Erneut senden",
"RESET": "ZURÜCKSETZEN",
"RESET": "Zurücksetzen",
"Reset_password": "Passwort zurücksetzen",
"resetting_password": "Passwort zurücksetzen",
"Resume": "Fortsetzen",
Expand All @@ -549,6 +551,7 @@
"Room_Info": "Room-Info",
"Room_Info_Edit": "Room-Info bearbeiten",
"Room_name_changed_to": "hat den Namen des Raumes geändert zu: {{name}}",
"Room_Password": "Raumkennwort",
"room_removed_read_only_permission": "hat die Nur-Lese-Berechtigung entfernt",
"room_set_read_only_permission": "hat den Raum auf \"Nur Lesen\" gesetzt",
"room_unarchived": "hat den Raum nicht mehr archiviert",
Expand Down Expand Up @@ -608,6 +611,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 Expand Up @@ -669,7 +673,7 @@
"Two_Factor_Authentication": "Zwei-Faktor-Authentifizierung",
"Type_message": "Nachricht schreiben",
"Types": "Typen",
"UNARCHIVE": "WIEDERHERSTELLEN",
"UNARCHIVE": "Wiederherstellen",
"unarchive": "wiederherstellen",
"unauthorized": "Nicht erlaubt",
"Unfollowed_thread": "Thread nicht mehr folgen",
Expand Down
10 changes: 7 additions & 3 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"announcement": "announcement",
"App_users_are_not_allowed_to_log_in_directly": "App users are not allowed to log in directly.",
"Apply_Certificate": "Apply certificate",
"ARCHIVE": "ARCHIVE",
"ARCHIVE": "Archive",
"archive": "archive",
"are_typing": "are typing",
"Are_you_sure_question_mark": "Are you sure?",
Expand Down Expand Up @@ -248,6 +248,7 @@
"e2ee_enabled": "End-to-end encryption is enabled",
"Edit": "Edit",
"Edit_Invite": "Edit invite",
"Edit_Room_Photo": "Edit room photo",
"Edit_Status": "Edit status",
"Email": "E-mail",
"email": "Email",
Expand Down Expand Up @@ -323,6 +324,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 @@ -608,7 +610,7 @@
"Required": "Required",
"Resend": "Resend",
"Resend_email": "Resend email",
"RESET": "RESET",
"RESET": "Reset",
"Reset_password": "Reset password",
"resetting_password": "resetting password",
"Resume": "Resume",
Expand All @@ -632,6 +634,7 @@
"Room_Info_Edit": "Room info edit",
"Room_name_changed_to": "changed room name to: {{name}}",
"Room_not_found": "Room not found",
"Room_Password": "Room Password",
"room_removed_read_only_permission": "removed read only permission",
"room_set_read_only_permission": "set room to read only",
"room_unarchived": "unarchived room",
Expand Down Expand Up @@ -694,6 +697,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 Expand Up @@ -762,7 +766,7 @@
"Two_Factor_Authentication": "Two-factor authentication",
"Type_message": "Type message",
"Types": "Types",
"UNARCHIVE": "UNARCHIVE",
"UNARCHIVE": "Unarchive",
"unarchive": "unarchive",
"unauthorized": "Unauthorized",
"Unblock": "Unblock",
Expand Down
10 changes: 7 additions & 3 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Announcement": "Anuncio",
"announcement": "anuncio",
"Apply_Certificate": "Aplicar certificado",
"ARCHIVE": "FICHERO",
"ARCHIVE": "Fichero",
"archive": "fichero",
"are_typing": "están escribiendo",
"Are_you_sure_question_mark": "¿Estás seguro?",
Expand Down Expand Up @@ -88,6 +88,7 @@
"Do_you_really_want_to_key_this_room_question_mark": "¿Deseas {{key}} de esta sala?",
"Dont_Have_An_Account": "¿Todavía no tienes una cuenta?",
"Edit": "Editar",
"Edit_Room_Photo": "Foto de la sala de edición",
"Email": "E-mail",
"Enable_Auto_Translate": "Permitir Auto-Translate",
"Error_uploading": "Error en la subida",
Expand Down Expand Up @@ -118,6 +119,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 @@ -211,13 +213,14 @@
"Report": "Informe",
"Required": "Requerido",
"Resend": "Reenviar",
"RESET": "RESET",
"RESET": "Reset",
"Reset_password": "Resetear contraseña",
"resetting_password": "reseteando contraseña",
"Rocket_Chat_Documentation": "Documentación de Rocket.Chat",
"Roles": "Roles",
"Room_Info": "Información de la sala",
"Room_Info_Edit": "Editar información de la sala",
"Room_Password": "Contraseña de habitación",
"SAVE": "GUARDAR",
"Save": "Guardar",
"Save_Changes": "Guardar cambios",
Expand All @@ -244,6 +247,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 Expand Up @@ -277,7 +281,7 @@
"Try_again": "Intentar de nuevo",
"Two_Factor_Authentication": "Autenticación de doble factor",
"Type_message": "Escribir mensaje",
"UNARCHIVE": "DESARCHIVAR",
"UNARCHIVE": "Desarchivar",
"unarchive": "desarchivar",
"Unfollowed_thread": "Dejar de seguir el hilo",
"Unmute": "Desmutear",
Expand Down
Loading