Skip to content

Commit

Permalink
chore(a11y): RoomInfoEditView (#6023)
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 ac6b8ca commit 3013649
Show file tree
Hide file tree
Showing 31 changed files with 307 additions and 304 deletions.
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
8 changes: 6 additions & 2 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 @@ -98,10 +99,12 @@ export const FormTextInput = ({
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={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 Down Expand Up @@ -169,6 +172,7 @@ export const FormTextInput = ({

{secureTextEntry ? (
<Touchable
style={[styles.iconContainer, styles.iconRight]}
accessible
accessibilityLabel={showPassword ? i18n.t('Hide_Password') : i18n.t('Show_Password')}
onPress={() => setShowPassword(!showPassword)}>
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 @@ -124,6 +124,7 @@
"E2E_How_It_Works_info4": "بإمكانك أيضاً إنشاء كلمة مرور جديدة لمفتاح التشفير في أي وقت عند دخولك بكلمة المرور الحالية لمفتاح التشفير",
"Edit": "تعديل",
"Edit_Invite": "تعديل الدعوة",
"Edit_Room_Photo": "تحرير صورة غرفة",
"Edit_Status": "تعديل الحالة",
"Email": "البريد الإلكتروني",
"Email_Notification_Mode_All": "لكل إشارة أو رسالة مباشرة",
Expand Down Expand Up @@ -371,6 +372,7 @@
"Roles": "أدوار",
"Room_Info": "معلومات الغرفة",
"Room_Info_Edit": "تعديل معلومات الغرفة",
"Room_Password": "كلمة مرور الغرفة",
"SAVE": "حفظ",
"Save": "حفظ",
"Save_Changes": "حفظ التغيرات",
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 @@ -222,6 +222,7 @@
"E2E_How_It_Works_info4": "আপনি যে কোনও ব্রাউজার থেকে একটি নতুন পাসওয়ার্ড সেটআপ করতে পারেন আপনার এনক্রিপশন কীর জন্য সময়ের মধ্যে যে কোনও ব্রাউজারে যাতে আপনি বর্তমানের E2E পাসওয়ার্ড দিয়ে এনটার করেছেন।",
"Edit": "সম্পাদনা করুন",
"Edit_Invite": "ইনভাইট সম্পাদনা করুন",
"Edit_Room_Photo": "ঘরের ছবি সম্পাদনা করুন",
"Edit_Status": "স্থিতি সম্পাদনা করুন",
"Email": "ইমেইল",
"Email_Notification_Mode_All": "প্রতি উল্লেখ / ডিএম",
Expand Down Expand Up @@ -566,6 +567,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
8 changes: 5 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 @@ -240,6 +240,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 @@ -592,7 +593,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 @@ -616,6 +617,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 @@ -749,7 +751,7 @@
"Two_Factor_Success_message": "Byl odeslán dvoufaktorový autentizační kód! Zkontrolujte svůj e-mail.",
"Type_message": "Zadejte zprávu",
"Types": "Typy",
"UNARCHIVE": "UNARCHIVOVAT",
"UNARCHIVE": "Unarchivovat",
"unarchive": "zrušit archivaci",
"unauthorized": "Neoprávněný",
"Unblock": "Odblokovat",
Expand Down
8 changes: 5 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 @@ -217,6 +217,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 @@ -530,7 +531,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 @@ -553,6 +554,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 @@ -675,7 +677,7 @@
"Two_Factor_Success_message": "Zwei-Faktor-Authentifizierungscode gesendet! Bitte überprüfen Sie Ihre E-Mail.",
"Type_message": "Nachricht schreiben",
"Types": "Typen",
"UNARCHIVE": "WIEDERHERSTELLEN",
"UNARCHIVE": "Wiederherstellen",
"unarchive": "wiederherstellen",
"unauthorized": "Nicht erlaubt",
"Unfollowed_thread": "Thread nicht mehr folgen",
Expand Down
8 changes: 5 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 @@ -249,6 +249,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 @@ -616,7 +617,7 @@
"Required": "Required",
"Resend": "Resend",
"Resend_email": "Resend email",
"RESET": "RESET",
"RESET": "Reset",
"Reset": "Reset",
"Reset_encryption_keys": "Reset encryption keys",
"Reset_encryption_keys_info__room_type__": "Resetting E2EE keys is only recommend if no {{room_type}} member has a valid key to regain access to the previously encrypted content.",
Expand Down Expand Up @@ -645,6 +646,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 @@ -777,7 +779,7 @@
"Two_Factor_Success_message": "Two-factor authentication code sent! Please check your email.",
"Type_message": "Type message",
"Types": "Types",
"UNARCHIVE": "UNARCHIVE",
"UNARCHIVE": "Unarchive",
"unarchive": "unarchive",
"unauthorized": "Unauthorized",
"Unblock": "Unblock",
Expand Down
8 changes: 5 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 @@ -90,6 +90,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 @@ -217,13 +218,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 Down Expand Up @@ -285,7 +287,7 @@
"Two_Factor_Authentication": "Autenticación de doble factor",
"Two_Factor_Success_message": "¡Código de autenticación de dos factores enviado! Por favor, revisa tu correo electrónico.",
"Type_message": "Escribir mensaje",
"UNARCHIVE": "DESARCHIVAR",
"UNARCHIVE": "Desarchivar",
"unarchive": "desarchivar",
"Unfollowed_thread": "Dejar de seguir el hilo",
"Unmute": "Desmutear",
Expand Down
8 changes: 5 additions & 3 deletions app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"Announcement": "Ilmoitus",
"announcement": "ilmoitus",
"Apply_Certificate": "Käytä sertifikaattia",
"ARCHIVE": "ARKISTO",
"ARCHIVE": "Arkisto",
"archive": "arkisto",
"are_typing": "kirjoittavat",
"Are_you_sure_question_mark": "Oletko varma?",
Expand Down Expand Up @@ -202,6 +202,7 @@
"E2E_How_It_Works_info4": "Voit myös määrittää uuden salasanan salausavaimellesi milloin tahansa missä tahansa selaimessa, jossa olet antanut nykyisen täyden salauksen salasanan.",
"Edit": "Muokkaa",
"Edit_Invite": "Muokkaa kutsua",
"Edit_Room_Photo": "Muokkaa huonekuvaa",
"Edit_Status": "Muokkaa tilaa",
"Email": "Sähköposti",
"Email_Notification_Mode_All": "Jokainen maininta/SV",
Expand Down Expand Up @@ -505,7 +506,7 @@
"Report": "Ilmoita",
"Required": "Vaadittu",
"Resend": "Lähetä uudelleen",
"RESET": "NOLLAA",
"RESET": "Nollaa",
"Reset_password": "Nollaa salasana",
"resetting_password": "nollaa salasanaa",
"Resume": "Jatka",
Expand All @@ -528,6 +529,7 @@
"Room_Info": "Huoneen tiedot",
"Room_Info_Edit": "Huoneen tietojen muokkaus",
"Room_name_changed_to": "vaihtoi huoneen nimeksi: {{name}}",
"Room_Password": "Huoneen salasana",
"room_removed_read_only_permission": "poisti vain luku -oikeuden",
"room_set_read_only_permission": "asetti huoneen vain luku -tilaan",
"room_unarchived": "palautti huoneen arkistosta",
Expand Down Expand Up @@ -650,7 +652,7 @@
"Two_Factor_Success_message": "Kaksivaiheinen todennuskoodi lähetetty! Tarkista sähköpostisi.",
"Type_message": "Kirjoita viesti",
"Types": "Tyypit",
"UNARCHIVE": "PALAUTA ARKISTOSTA",
"UNARCHIVE": "Palauta arkistosta",
"unarchive": "palauta arkistosta",
"unauthorized": "Valtuuttamaton",
"Unfollowed_thread": "Lopetettiin ketjun seuraaminen",
Expand Down
8 changes: 5 additions & 3 deletions app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"Announcement": "Annonce",
"announcement": "annonce",
"Apply_Certificate": "Appliquer le certificat",
"ARCHIVE": "ARCHIVER",
"ARCHIVE": "Archiver",
"archive": "archiver",
"are_typing": "sont en train d'écrire",
"Are_you_sure_question_mark": "Êtes-vous sûr ?",
Expand Down Expand Up @@ -170,6 +170,7 @@
"E2E_How_It_Works_info4": "Vous pouvez également configurer un nouveau mot de passe pour votre clé de cryptage à tout moment à partir de n'importe quel navigateur dans lequel vous avez entré le mot de passe E2E existant.",
"Edit": "Modifier",
"Edit_Invite": "Modifier l'invitation",
"Edit_Room_Photo": "Modifier la salle Photo",
"Edit_Status": "Modifier le statut",
"Email": "E-mail",
"Email_Notification_Mode_All": "Chaque mention/MD",
Expand Down Expand Up @@ -461,7 +462,7 @@
"Report": "Signaler",
"Required": "Requis",
"Resend": "Renvoyer",
"RESET": "RÉINITIALISER",
"RESET": "Réinitialiser",
"Reset_password": "Réinitialiser le mot de passe",
"resetting_password": "réinitialisation du mot de passe",
"Resume": "Reprendre",
Expand All @@ -476,6 +477,7 @@
"Roles": "Rôles",
"Room_Info": "Info sur le salon",
"Room_Info_Edit": "Modifier les informations du salon",
"Room_Password": "Mot de passe de la salle",
"room-name-already-exists": "Le nom du salon existe déjà",
"SAVE": "SAUVEGARDER",
"Save": "Sauvegarder",
Expand Down Expand Up @@ -581,7 +583,7 @@
"Two_Factor_Success_message": "Code d'authentification à deux facteurs envoyé ! Veuillez vérifier votre e-mail.",
"Type_message": "Tapez le message",
"Types": "Types",
"UNARCHIVE": "DÉSARCHIVER",
"UNARCHIVE": "Désarchiver",
"unarchive": "désarchiver",
"unauthorized": "Non autorisé",
"Unfollowed_thread": "Ne plus suivre ce fil",
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 @@ -222,6 +222,7 @@
"E2E_How_It_Works_info4": "आप अपने इंड-टू-इंड पासवर्ड से पुनः ब्राउज़र में किसी भी स्थान से कभी भी एक नए पासवर्ड को सेटअप कर सकते हैं।",
"Edit": "संपादित करें",
"Edit_Invite": "आमंत्रण संपादित करें",
"Edit_Room_Photo": "कमरे की तस्वीर संपादित करें",
"Edit_Status": "स्थिति संपादित करें",
"Email": "ईमेल",
"Email_Notification_Mode_All": "हर मेंशन/डीएम",
Expand Down Expand Up @@ -566,6 +567,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
6 changes: 4 additions & 2 deletions app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"Announcement": "Bejelentés",
"announcement": "bejelentés",
"Apply_Certificate": "Tanúsítvány alkalmazása",
"ARCHIVE": "ARCHÍVUM",
"ARCHIVE": "Archívum",
"archive": "archívum",
"are_typing": "éppen ír",
"Are_you_sure_question_mark": "Biztos vagy benne?",
Expand Down Expand Up @@ -222,6 +222,7 @@
"E2E_How_It_Works_info4": "A titkosítási kulcshoz bármikor beállíthat egy új jelszót is, bármelyik böngészőből, ahová a meglévő E2E jelszót beírta.",
"Edit": "Szerkesztés",
"Edit_Invite": "Meghívás szerkesztése",
"Edit_Room_Photo": "Szobás fotó szerkesztése",
"Edit_Status": "Állapot szerkesztése",
"Email": "E-mail",
"Email_Notification_Mode_All": "Minden említés/DM ",
Expand Down Expand Up @@ -567,6 +568,7 @@
"Room_Info_Edit": "Szoba információ szerkesztés",
"Room_name_changed_to": "szoba neve megváltoztatva erre: {{name}}",
"Room_not_found": "Szoba nem található",
"Room_Password": "Szoba jelszó",
"room_removed_read_only_permission": "csak olvasható jogosultság eltávolítva",
"room_set_read_only_permission": "szoba beállítva csak olvashatóra",
"room_unarchived": "archiválásból megszüntetett szoba",
Expand Down Expand Up @@ -684,7 +686,7 @@
"Two_Factor_Success_message": "Kétfaktoros hitelesítési kód elküldve! Kérjük, ellenőrizze az emailjét.",
"Type_message": "Üzenet típusa",
"Types": "Típusok",
"UNARCHIVE": "ARCHIVÁLÁS MEGSZÜNTETÉS",
"UNARCHIVE": "Archiválás megszüntetés",
"unarchive": "Archiválás megszüntetés",
"unauthorized": "Jogosulatlan",
"Unfollowed_thread": "Nem követett szál",
Expand Down
Loading

0 comments on commit 3013649

Please sign in to comment.