From 13cea97c9b7adc404b1a96c3130f8a40710c41df Mon Sep 17 00:00:00 2001 From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:15:43 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=97=20feat:=20More=20Accessible=20Link?= =?UTF-8?q?=20Behaviors=20and=20Minor=20UI=20Improvements=20(#11549)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: accessibility issues with links and link descriptions + minor ui tweaks * fix: link accessibility in archived chats table * fix: remove open in new tab behavior for other footer links * chore: remove unused translation string * style: formatting * refactor: rename searchState to searchStore for clarity * chore: Reorganize imports and state variables in SharedLinks * chore: re-organize imports/hooks --------- Co-authored-by: Danny Avila Co-authored-by: Danny Avila --- client/src/components/Chat/Footer.tsx | 22 +--- .../Nav/SettingsTabs/Data/SharedLinks.tsx | 102 +++++++++-------- .../General/ArchivedChatsTable.tsx | 106 +++++++++++------- client/src/locales/en/translation.json | 4 +- 4 files changed, 129 insertions(+), 105 deletions(-) diff --git a/client/src/components/Chat/Footer.tsx b/client/src/components/Chat/Footer.tsx index 72aa04be57..75dd853c4f 100644 --- a/client/src/components/Chat/Footer.tsx +++ b/client/src/components/Chat/Footer.tsx @@ -13,30 +13,14 @@ export default function Footer({ className }: { className?: string }) { const termsOfService = config?.interface?.termsOfService; const privacyPolicyRender = privacyPolicy?.externalUrl != null && ( - + {localize('com_ui_privacy_policy')} - {privacyPolicy.openNewTab === true && ( - {' ' + localize('com_ui_opens_new_tab')} - )} ); const termsOfServiceRender = termsOfService?.externalUrl != null && ( - + {localize('com_ui_terms_of_service')} - {termsOfService.openNewTab === true && ( - {' ' + localize('com_ui_opens_new_tab')} - )} ); @@ -67,12 +51,10 @@ export default function Footer({ className }: { className?: string }) { {children} - {' ' + localize('com_ui_opens_new_tab')} ); }, diff --git a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx index eee7414bc2..af1803adf7 100644 --- a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx +++ b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx @@ -4,33 +4,33 @@ import debounce from 'lodash/debounce'; import { useRecoilValue } from 'recoil'; import { Link } from 'react-router-dom'; import { - TrashIcon, - MessageSquare, - ArrowUpDown, ArrowUp, + TrashIcon, ArrowDown, + ArrowUpDown, ExternalLink, + MessageSquare, } from 'lucide-react'; -import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider'; -import type { TranslationKeys } from '~/hooks'; import { + Label, + Button, + Spinner, OGDialog, - useToastContext, - OGDialogTemplate, - OGDialogTrigger, - OGDialogContent, + DataTable, useMediaQuery, - OGDialogHeader, OGDialogTitle, TooltipAnchor, - DataTable, - Spinner, - Button, - Label, + OGDialogHeader, + OGDialogTrigger, + OGDialogContent, + useToastContext, + OGDialogTemplate, } from '@librechat/client'; +import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider'; +import type { TranslationKeys } from '~/hooks'; import { useDeleteSharedLinkMutation, useSharedLinksQuery } from '~/data-provider'; -import { useLocalize } from '~/hooks'; import { NotificationSeverity } from '~/common'; +import { useLocalize } from '~/hooks'; import { formatDate } from '~/utils'; import store from '~/store'; @@ -47,12 +47,12 @@ const DEFAULT_PARAMS: SharedLinksListParams = { export default function SharedLinks() { const localize = useLocalize(); const { showToast } = useToastContext(); - const isSmallScreen = useMediaQuery('(max-width: 768px)'); - const isSearchEnabled = useRecoilValue(store.search); - const [queryParams, setQueryParams] = useState(DEFAULT_PARAMS); - const [deleteRow, setDeleteRow] = useState(null); - const [isDeleteOpen, setIsDeleteOpen] = useState(false); const [isOpen, setIsOpen] = useState(false); + const searchStore = useRecoilValue(store.search); + const [isDeleteOpen, setIsDeleteOpen] = useState(false); + const isSmallScreen = useMediaQuery('(max-width: 768px)'); + const [deleteRow, setDeleteRow] = useState(null); + const [queryParams, setQueryParams] = useState(DEFAULT_PARAMS); const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch, isLoading } = useSharedLinksQuery(queryParams, { @@ -173,17 +173,23 @@ export default function SharedLinks() { ariaSort = 'ascending'; } return ( - + column.toggleSorting(column.getIsSorted() === 'asc')} + className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm" + aria-sort={ariaSort} + aria-label={localize('com_ui_name_sort')} + aria-current={sortState ? 'true' : 'false'} + > + {localize('com_ui_name')} + + + } + /> ); }, cell: ({ row }) => { @@ -207,7 +213,7 @@ export default function SharedLinks() { ); }, meta: { - size: '35%', + size: '32%', mobileSize: '50%', }, }, @@ -225,17 +231,23 @@ export default function SharedLinks() { ariaSort = 'ascending'; } return ( - + column.toggleSorting(column.getIsSorted() === 'asc')} + className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm" + aria-sort={ariaSort} + aria-label={localize('com_ui_date_sort')} + aria-current={sortState ? 'true' : 'false'} + > + {localize('com_ui_date')} + + + } + /> ); }, cell: ({ row }) => formatDate(row.original.createdAt?.toString() ?? '', isSmallScreen), @@ -247,7 +259,7 @@ export default function SharedLinks() { { accessorKey: 'actions', header: () => ( -