Skip to content

Commit

Permalink
fix: role and aria-label
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-singh8 authored and danny-avila committed Aug 16, 2024
1 parent 0ba08b1 commit 8dc3d82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/src/components/Nav/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
useLocalStorage,
useNavScrolling,
useConversations,
useLocalize,
} from '~/hooks';
import { useConversationsInfiniteQuery } from '~/data-provider';
import { TooltipProvider, Tooltip } from '~/components/ui';
Expand All @@ -24,6 +25,7 @@ import { cn } from '~/utils';
import store from '~/store';

const Nav = ({ navVisible, setNavVisible }) => {
const localize = useLocalize();
const { conversationId } = useParams();
const { isAuthenticated } = useAuthContext();

Expand Down Expand Up @@ -141,7 +143,7 @@ const Nav = ({ navVisible, setNavVisible }) => {
>
<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"
>
<div
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/SidePanel/SidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { TEndpointsConfig } from 'librechat-data-provider';
import { ResizableHandleAlt, ResizablePanel, ResizablePanelGroup } from '~/components/ui/Resizable';
import { TooltipProvider, Tooltip } from '~/components/ui/Tooltip';
import useSideNavLinks from '~/hooks/Nav/useSideNavLinks';
import { useMediaQuery, useLocalStorage } from '~/hooks';
import { useMediaQuery, useLocalStorage, useLocalize } from '~/hooks';
import NavToggle from '~/components/Nav/NavToggle';
import { useChatContext } from '~/Providers';
import Switcher from './Switcher';
Expand All @@ -36,6 +36,7 @@ const SidePanel = ({
navCollapsedSize = 3,
children,
}: SidePanelProps) => {
const localize = useLocalize();
const [isHovering, setIsHovering] = useState(false);
const [minSize, setMinSize] = useState(defaultMinSize);
const [newUser, setNewUser] = useLocalStorage('newUser', true);
Expand Down Expand Up @@ -173,7 +174,8 @@ const SidePanel = ({
<ResizablePanel
tagName="nav"
id="controls-nav"
aria-label="controls-nav"
aria-label={localize('com_ui_controls')}
role="region"
collapsedSize={collapsedSize}
defaultSize={defaultLayout[1]}
collapsible={true}
Expand Down
2 changes: 2 additions & 0 deletions client/src/localization/languages/Eng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ export default {
com_ui_import_conversation_file_type_error: 'Unsupported import type',
com_ui_confirm_action: 'Confirm Action',
com_ui_chat: 'Chat',
com_ui_chat_history: 'Chat History',
com_ui_controls: 'Controls',
com_ui_dashboard: 'Dashboard',
com_ui_chats: 'chats',
com_ui_avatar: 'Avatar',
Expand Down

0 comments on commit 8dc3d82

Please sign in to comment.