From 9f445957129449c1c638296ce06e4789b6606ca2 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 11 Jul 2025 16:18:31 -0600 Subject: [PATCH] Update aria accesiblity controls --- .../src/components/ui/layouts/AppSplitter/AppSplitter.tsx | 2 +- apps/web/src/components/ui/select/Select.tsx | 4 +++- apps/web/src/layouts/ChatLayout/ChatLayout/ChatLayout.tsx | 8 +++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/ui/layouts/AppSplitter/AppSplitter.tsx b/apps/web/src/components/ui/layouts/AppSplitter/AppSplitter.tsx index f346cfe4e..d2a84cb71 100644 --- a/apps/web/src/components/ui/layouts/AppSplitter/AppSplitter.tsx +++ b/apps/web/src/components/ui/layouts/AppSplitter/AppSplitter.tsx @@ -3,7 +3,6 @@ import React, { useCallback, useEffect, - useLayoutEffect, useRef, useState, useImperativeHandle, @@ -793,3 +792,4 @@ const AppSplitterBase = forwardRef< export const AppSplitter = React.memo(AppSplitterWrapper); AppSplitter.displayName = 'AppSplitter'; +AppSplitterBase.displayName = 'AppSplitterBase'; diff --git a/apps/web/src/components/ui/select/Select.tsx b/apps/web/src/components/ui/select/Select.tsx index d6290e460..604b7d8ab 100644 --- a/apps/web/src/components/ui/select/Select.tsx +++ b/apps/web/src/components/ui/select/Select.tsx @@ -152,6 +152,7 @@ function SelectComponent({ const [isFocused, setIsFocused] = React.useState(false); const inputRef = React.useRef(null); const commandRef = React.useRef(null); + const listboxId = React.useId(); const open = controlledOpen !== undefined ? controlledOpen : internalOpen; @@ -342,6 +343,7 @@ function SelectComponent({ type="text" role="combobox" aria-expanded={open} + aria-controls={listboxId} aria-label={placeholder} disabled={disabled || loading} value={inputDisplayValue} @@ -398,7 +400,7 @@ function SelectComponent({ aria-hidden="true" />
- + {emptyMessage} {renderedItems} diff --git a/apps/web/src/layouts/ChatLayout/ChatLayout/ChatLayout.tsx b/apps/web/src/layouts/ChatLayout/ChatLayout/ChatLayout.tsx index caf39978f..5e3b6cdfa 100644 --- a/apps/web/src/layouts/ChatLayout/ChatLayout/ChatLayout.tsx +++ b/apps/web/src/layouts/ChatLayout/ChatLayout/ChatLayout.tsx @@ -41,11 +41,9 @@ export const ChatLayout: React.FC = ({ children }) => { const mounted = true; const bustStorageOnInit = (preservedSideValue: number | null, containerSize: number) => { - console.log('bustStorageOnInit', autoSaveId, preservedSideValue, { - selectedLayout, - secondaryFileView, - containerSize - }); + if (containerSize && !preservedSideValue) { + return true; + } return selectedLayout === 'chat-only' || selectedLayout === 'file-only' || !!secondaryFileView; };