From b9197f90c69e0184d8af7eb65c9400463d3a0228 Mon Sep 17 00:00:00 2001 From: Vesna Tan Date: Thu, 5 Sep 2024 14:30:17 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=90=20a11y:=20Misc.=20Improvements=20(?= =?UTF-8?q?#3910)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix focus for cancel button in convo delete modal window #3829 * add aria-hidden and aria-label to X and Check svg/button respectively and updated OGDialogClose focus color * update rename, newchat, newchat icon, ConvoOptions icon --- client/src/components/Conversations/Convo.tsx | 11 +++++++---- .../Conversations/ConvoOptions/ConvoOptions.tsx | 2 +- client/src/components/Nav/NewChat.tsx | 2 +- client/src/components/svg/NewChatIcon.tsx | 1 + client/src/components/ui/OGDialogTemplate.tsx | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/client/src/components/Conversations/Convo.tsx b/client/src/components/Conversations/Convo.tsx index 2dd608bc92a..ab7b38b5ee3 100644 --- a/client/src/components/Conversations/Convo.tsx +++ b/client/src/components/Conversations/Convo.tsx @@ -14,6 +14,7 @@ import { useToastContext } from '~/Providers'; import { ConvoOptions } from './ConvoOptions'; import { cn } from '~/utils'; import store from '~/store'; +import { useLocalize } from '~/hooks' type KeyEvent = KeyboardEvent; @@ -44,6 +45,7 @@ export default function Conversation({ const [renaming, setRenaming] = useState(false); const [isPopoverActive, setIsPopoverActive] = useState(false); const isSmallScreen = useMediaQuery('(max-width: 768px)'); + const localize = useLocalize(); const clickHandler = async (event: MouseEvent) => { if (event.button === 0 && (event.ctrlKey || event.metaKey)) { @@ -146,13 +148,14 @@ export default function Conversation({ value={titleInput ?? ''} onChange={(e) => setTitleInput(e.target.value)} onKeyDown={handleKeyDown} + aria-label={`${localize('com_ui_rename')} ${localize('com_ui_chat')}`} />
- -
diff --git a/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx b/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx index d3bfc276632..3b3dcb40b37 100644 --- a/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx +++ b/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx @@ -76,7 +76,7 @@ export default function ConvoOptions({ : 'opacity-0 focus:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[open]:opacity-100', )} > - + } items={dropdownItems} diff --git a/client/src/components/Nav/NewChat.tsx b/client/src/components/Nav/NewChat.tsx index 5646706d502..8766924a4af 100644 --- a/client/src/components/Nav/NewChat.tsx +++ b/client/src/components/Nav/NewChat.tsx @@ -101,7 +101,7 @@ export default function NewChat({