mirror of https://github.com/buster-so/buster.git
Update aria accesiblity controls
This commit is contained in:
parent
c2dee1e5be
commit
9f44595712
|
@ -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';
|
||||
|
|
|
@ -152,6 +152,7 @@ function SelectComponent<T = string>({
|
|||
const [isFocused, setIsFocused] = React.useState(false);
|
||||
const inputRef = React.useRef<HTMLInputElement>(null);
|
||||
const commandRef = React.useRef<HTMLDivElement>(null);
|
||||
const listboxId = React.useId();
|
||||
|
||||
const open = controlledOpen !== undefined ? controlledOpen : internalOpen;
|
||||
|
||||
|
@ -342,6 +343,7 @@ function SelectComponent<T = string>({
|
|||
type="text"
|
||||
role="combobox"
|
||||
aria-expanded={open}
|
||||
aria-controls={listboxId}
|
||||
aria-label={placeholder}
|
||||
disabled={disabled || loading}
|
||||
value={inputDisplayValue}
|
||||
|
@ -398,7 +400,7 @@ function SelectComponent<T = string>({
|
|||
aria-hidden="true"
|
||||
/>
|
||||
<div className="scrollbar-hide max-h-[300px] overflow-y-auto">
|
||||
<CommandList className="p-1">
|
||||
<CommandList id={listboxId} className="p-1">
|
||||
<CommandEmpty>{emptyMessage}</CommandEmpty>
|
||||
{renderedItems}
|
||||
</CommandList>
|
||||
|
|
|
@ -41,11 +41,9 @@ export const ChatLayout: React.FC<ChatSplitterProps> = ({ 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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue