mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🤲 a11y: Update Chat History aria-label & Controls role (#3604)
This commit is contained in:
parent
e47c3f40f0
commit
93cf7bab02
3 changed files with 9 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ import {
|
||||||
useLocalStorage,
|
useLocalStorage,
|
||||||
useNavScrolling,
|
useNavScrolling,
|
||||||
useConversations,
|
useConversations,
|
||||||
|
useLocalize,
|
||||||
} from '~/hooks';
|
} from '~/hooks';
|
||||||
import { useConversationsInfiniteQuery } from '~/data-provider';
|
import { useConversationsInfiniteQuery } from '~/data-provider';
|
||||||
import { TooltipProvider, Tooltip } from '~/components/ui';
|
import { TooltipProvider, Tooltip } from '~/components/ui';
|
||||||
|
|
@ -24,6 +25,7 @@ import { cn } from '~/utils';
|
||||||
import store from '~/store';
|
import store from '~/store';
|
||||||
|
|
||||||
const Nav = ({ navVisible, setNavVisible }) => {
|
const Nav = ({ navVisible, setNavVisible }) => {
|
||||||
|
const localize = useLocalize();
|
||||||
const { conversationId } = useParams();
|
const { conversationId } = useParams();
|
||||||
const { isAuthenticated } = useAuthContext();
|
const { isAuthenticated } = useAuthContext();
|
||||||
|
|
||||||
|
|
@ -141,7 +143,7 @@ const Nav = ({ navVisible, setNavVisible }) => {
|
||||||
>
|
>
|
||||||
<nav
|
<nav
|
||||||
id="chat-history-nav"
|
id="chat-history-nav"
|
||||||
aria-label="chat-history-nav"
|
aria-label={localize('com_ui_chat_history')}
|
||||||
className="flex h-full w-full flex-col px-3 pb-3.5"
|
className="flex h-full w-full flex-col px-3 pb-3.5"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import type { TEndpointsConfig } from 'librechat-data-provider';
|
||||||
import { ResizableHandleAlt, ResizablePanel, ResizablePanelGroup } from '~/components/ui/Resizable';
|
import { ResizableHandleAlt, ResizablePanel, ResizablePanelGroup } from '~/components/ui/Resizable';
|
||||||
import { TooltipProvider, Tooltip } from '~/components/ui/Tooltip';
|
import { TooltipProvider, Tooltip } from '~/components/ui/Tooltip';
|
||||||
import useSideNavLinks from '~/hooks/Nav/useSideNavLinks';
|
import useSideNavLinks from '~/hooks/Nav/useSideNavLinks';
|
||||||
import { useMediaQuery, useLocalStorage } from '~/hooks';
|
import { useMediaQuery, useLocalStorage, useLocalize } from '~/hooks';
|
||||||
import NavToggle from '~/components/Nav/NavToggle';
|
import NavToggle from '~/components/Nav/NavToggle';
|
||||||
import { useChatContext } from '~/Providers';
|
import { useChatContext } from '~/Providers';
|
||||||
import Switcher from './Switcher';
|
import Switcher from './Switcher';
|
||||||
|
|
@ -36,6 +36,7 @@ const SidePanel = ({
|
||||||
navCollapsedSize = 3,
|
navCollapsedSize = 3,
|
||||||
children,
|
children,
|
||||||
}: SidePanelProps) => {
|
}: SidePanelProps) => {
|
||||||
|
const localize = useLocalize();
|
||||||
const [isHovering, setIsHovering] = useState(false);
|
const [isHovering, setIsHovering] = useState(false);
|
||||||
const [minSize, setMinSize] = useState(defaultMinSize);
|
const [minSize, setMinSize] = useState(defaultMinSize);
|
||||||
const [newUser, setNewUser] = useLocalStorage('newUser', true);
|
const [newUser, setNewUser] = useLocalStorage('newUser', true);
|
||||||
|
|
@ -173,7 +174,8 @@ const SidePanel = ({
|
||||||
<ResizablePanel
|
<ResizablePanel
|
||||||
tagName="nav"
|
tagName="nav"
|
||||||
id="controls-nav"
|
id="controls-nav"
|
||||||
aria-label="controls-nav"
|
aria-label={localize('com_ui_controls')}
|
||||||
|
role="region"
|
||||||
collapsedSize={collapsedSize}
|
collapsedSize={collapsedSize}
|
||||||
defaultSize={defaultLayout[1]}
|
defaultSize={defaultLayout[1]}
|
||||||
collapsible={true}
|
collapsible={true}
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,8 @@ export default {
|
||||||
com_ui_import_conversation_file_type_error: 'Unsupported import type',
|
com_ui_import_conversation_file_type_error: 'Unsupported import type',
|
||||||
com_ui_confirm_action: 'Confirm Action',
|
com_ui_confirm_action: 'Confirm Action',
|
||||||
com_ui_chat: 'Chat',
|
com_ui_chat: 'Chat',
|
||||||
|
com_ui_chat_history: 'Chat History',
|
||||||
|
com_ui_controls: 'Controls',
|
||||||
com_ui_dashboard: 'Dashboard',
|
com_ui_dashboard: 'Dashboard',
|
||||||
com_ui_chats: 'chats',
|
com_ui_chats: 'chats',
|
||||||
com_ui_avatar: 'Avatar',
|
com_ui_avatar: 'Avatar',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue