From e59d8a463168b2d31c8826fe069cb6e97603976f Mon Sep 17 00:00:00 2001 From: Cyril Date: Tue, 14 Apr 2026 15:46:48 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F(frontend)=20make=20doc=20sea?= =?UTF-8?q?rch=20result=20labels=20uniquely=20identifiable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include each doc's relative update date in `SimpleDocItem` aria-label. --- CHANGELOG.md | 7 ++++--- .../doc-management/components/SimpleDocItem.tsx | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102c6b602..98ae36b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,14 +14,15 @@ and this project adheres to ### Changed - - ♿️(frontend) structure correctly 5xx error alerts #2128 +- ♿️(frontend) structure correctly 5xx error alerts #2128 +- ♿️(frontend) make doc search result labels uniquely identifiable #2212 ## [v4.8.6] - 2026-04-08 ### Added -- 🚸(frontend) allow opening "@page" links with -ctrl/command/middle-mouse click #2170 +- 🚸(frontend) allow opening "@page" links with + ctrl/command/middle-mouse click #2170 - ✅ E2E - Any instance friendly #2142 ### Changed diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/components/SimpleDocItem.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/components/SimpleDocItem.tsx index 1f8f6b711..da427069a 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/components/SimpleDocItem.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/components/SimpleDocItem.tsx @@ -38,7 +38,15 @@ export const SimpleDocItem = ({ const { isDesktop } = useResponsiveStore(); const { untitledDocument } = useTrans(); const { isChild } = useDocUtils(doc); - const { relativeDate } = useDate(); + const { relativeDate, formatDate } = useDate(); + const docTitle = doc.title || untitledDocument; + const docRelativeUpdate = relativeDate(doc.updated_at); + const itemAriaLabel = `${t('Open document {{title}}', { title: docTitle })}. ${t( + 'Last update: {{update}}', + { + update: formatDate(doc.updated_at), + }, + )}`; return ( - {doc.title || untitledDocument} + {docTitle} {(!isDesktop || showAccesses) && ( )}