🚹 feat: Miscellaneous Accessibility Improvements (#10913)

* 🔱 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
This commit is contained in:
Dustin Healy 2025-12-11 07:42:28 -08:00 committed by Danny Avila
parent abcf606328
commit 4a0fbb07bc
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
5 changed files with 88 additions and 34 deletions

View file

@ -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 (
<div
className={cn(
@ -42,15 +59,13 @@ export default function NavToggle({
>
<TooltipAnchor
side={side === 'right' ? 'left' : 'right'}
aria-label={side === 'left' ? localize('com_ui_chat_history') : localize('com_ui_controls')}
aria-label={ariaDescription}
aria-expanded={navVisible}
aria-controls={side === 'left' ? 'chat-history-nav' : 'controls-nav'}
id={`toggle-${side}-nav`}
onClick={onToggle}
role="button"
description={
navVisible ? localize('com_nav_close_sidebar') : localize('com_nav_open_sidebar')
}
description={ariaDescription}
className="flex items-center justify-center"
tabIndex={0}
>