From 79763b60721a9ea985b5a0f2437ee69e9de81420 Mon Sep 17 00:00:00 2001 From: cj-do-gta-sander Date: Thu, 24 Oct 2024 10:49:01 -0300 Subject: [PATCH] chore: remove redundancy in "View Profile" and "Game" button for screen readers --- src/locales/en/translation.json | 3 ++- src/locales/pt-BR/translation.json | 3 ++- src/renderer/src/components/sidebar/sidebar-profile.tsx | 1 + src/renderer/src/components/sidebar/sidebar.tsx | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 9e39e2fd..73ccacec 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -25,7 +25,8 @@ "queued": "{{title}} (Queued)", "game_has_no_executable": "Game has no executable selected", "sign_in": "Sign in", - "friends": "Friends" + "friends": "Friends", + "aria_view_profile": "View profile" }, "header": { "search": "Search games", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 9ea86fe9..a2a3a9ac 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -25,7 +25,8 @@ "queued": "{{title}} (Na fila)", "game_has_no_executable": "Jogo não possui executável selecionado", "sign_in": "Login", - "friends": "Amigos" + "friends": "Amigos", + "aria_view_profile": "Ver perfil" }, "header": { "search": "Buscar jogos", diff --git a/src/renderer/src/components/sidebar/sidebar-profile.tsx b/src/renderer/src/components/sidebar/sidebar-profile.tsx index 49e56ab7..af8da63c 100644 --- a/src/renderer/src/components/sidebar/sidebar-profile.tsx +++ b/src/renderer/src/components/sidebar/sidebar-profile.tsx @@ -89,6 +89,7 @@ export function SidebarProfile() { type="button" className={styles.profileButton} onClick={handleProfileClick} + aria-label={t("aria_view_profile")} >
handleSidebarGameClick(event, game)} + aria-label={game.title} > {game.iconUrl ? (