From 7ea9cc06f22cc34ed6e1207c0b8bf6d5072532fd Mon Sep 17 00:00:00 2001
From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com>
Date: Thu, 11 Dec 2025 07:42:28 -0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B9=20feat:=20Miscellaneous=20Accessib?=
=?UTF-8?q?ility=20Improvements=20(#10913)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 🔱 fix: Fork Menu Accessibility Improvements (#10910)
* feat: more accessible aria-label for fork button
* fix: alignment between text and checkbox
* feat: add text change on focus for parity with on hover for keyboard accessibility
* 🤔 fix: Programmatic Expansion State for Thinking Button (#10912)
* 🙋♂️ feat: Accessible Default User Icon Colors (#10909)
* fix: downshift values for all non-compliant default bg-colors for user icons to achieve 4.5:1 contrast threshold minimums with text
* 🚪 feat: Open Sidebar Label Accessibility (#10893)
* feat: more accessible labelling on open / close sidebar
---
.../Chat/Messages/Content/Parts/Thinking.tsx | 1 +
client/src/components/Chat/Messages/Fork.tsx | 76 +++++++++++--------
client/src/components/Nav/NavToggle.tsx | 23 +++++-
client/src/locales/en/translation.json | 4 +
packages/client/src/hooks/useAvatar.ts | 18 +++++
5 files changed, 88 insertions(+), 34 deletions(-)
diff --git a/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx b/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx
index 9a7618ef3f..0e7d3de918 100644
--- a/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/Thinking.tsx
@@ -65,6 +65,7 @@ export const ThinkingButton = memo(
diff --git a/client/src/components/Nav/NavToggle.tsx b/client/src/components/Nav/NavToggle.tsx
index 002ab5dd89..301ccdfe8c 100644
--- a/client/src/components/Nav/NavToggle.tsx
+++ b/client/src/components/Nav/NavToggle.tsx
@@ -29,6 +29,23 @@ export default function NavToggle({
const topBarRotation = side === 'right' ? `-${rotation}` : rotation;
const bottomBarRotation = side === 'right' ? rotation : `-${rotation}`;
+ let sidebarLabel;
+ let actionKey;
+
+ if (side === 'left') {
+ sidebarLabel = localize('com_ui_chat_history');
+ } else {
+ sidebarLabel = localize('com_nav_control_panel');
+ }
+
+ if (navVisible) {
+ actionKey = 'com_ui_close_var';
+ } else {
+ actionKey = 'com_ui_open_var';
+ }
+
+ const ariaDescription = localize(actionKey, { 0: sidebarLabel });
+
return (
diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json
index d8bb756324..caf8c41de2 100644
--- a/client/src/locales/en/translation.json
+++ b/client/src/locales/en/translation.json
@@ -440,6 +440,7 @@
"com_nav_clear_conversation_confirm_message": "Are you sure you want to clear all conversations? This is irreversible.",
"com_nav_close_sidebar": "Close sidebar",
"com_nav_commands": "Commands",
+ "com_nav_control_panel": "Control Panel",
"com_nav_confirm_clear": "Confirm Clear",
"com_nav_conversation_mode": "Conversation Mode",
"com_nav_convo_menu_options": "Conversation Menu Options",
@@ -788,6 +789,7 @@
"com_ui_client_secret": "Client Secret",
"com_ui_close": "Close",
"com_ui_close_menu": "Close Menu",
+ "com_ui_close_var": "Close {{0}}",
"com_ui_close_settings": "Close Settings",
"com_ui_close_window": "Close Window",
"com_ui_code": "Code",
@@ -979,6 +981,7 @@
"com_ui_fork_info_visible": "This option forks only the visible messages; in other words, the direct path to the target message, without any branches.",
"com_ui_fork_more_details_about": "View additional information and details about the \"{{0}}\" fork option",
"com_ui_fork_more_info_options": "View detailed explanation of all fork options and their behaviors",
+ "com_ui_fork_open_menu": "Open Fork Menu",
"com_ui_fork_processing": "Forking conversation...",
"com_ui_fork_remember": "Remember",
"com_ui_fork_remember_checked": "Your selection will be remembered after usage. Change this at any time in the settings.",
@@ -1268,6 +1271,7 @@
"com_ui_share_var": "Share {{0}}",
"com_ui_shared_link_delete_success": "Successfully deleted shared link",
"com_ui_shared_link_not_found": "Shared link not found",
+ "com_ui_open_var": "Open {{0}}",
"com_ui_shared_prompts": "Shared Prompts",
"com_ui_shop": "Shopping",
"com_ui_show_all": "Show All",
diff --git a/packages/client/src/hooks/useAvatar.ts b/packages/client/src/hooks/useAvatar.ts
index e79d9c8649..8b183bb276 100644
--- a/packages/client/src/hooks/useAvatar.ts
+++ b/packages/client/src/hooks/useAvatar.ts
@@ -25,6 +25,24 @@ const useAvatar = (user: TUser | undefined) => {
seed,
fontFamily: ['Verdana'],
fontSize: 36,
+ backgroundType: ['solid'],
+ backgroundColor: [
+ 'd81b60',
+ '8e24aa',
+ '5e35b1',
+ '3949ab',
+ 'DB3733',
+ '1B79CC',
+ '027CB8',
+ '008291',
+ '008577',
+ '58802F',
+ '8A761D',
+ '9C6D00',
+ 'B06200',
+ 'D1451A',
+ ],
+ textColor: ['ffffff'],
});
let avatarDataUri = '';