File tree Expand file tree Collapse file tree
src/frontend/apps/impress/src/features/docs/doc-management/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ export const SimpleDocItem = ({
3939 const { untitledDocument } = useTrans ( ) ;
4040 const { isChild } = useDocUtils ( doc ) ;
4141 const { relativeDate } = useDate ( ) ;
42+ const docTitle = doc . title || untitledDocument ;
43+ const docRelativeUpdate = relativeDate ( doc . updated_at ) ;
44+ const itemAriaLabel = `${ t ( 'Open document {{title}}' , { title : docTitle } ) } . ${ t (
45+ 'Last update: {{update}}' ,
46+ {
47+ update : docRelativeUpdate ,
48+ } ,
49+ ) } `;
4250
4351 return (
4452 < Box
@@ -48,7 +56,7 @@ export const SimpleDocItem = ({
4856 $width = "100%"
4957 className = "--docs--simple-doc-item"
5058 role = "presentation"
51- aria-label = { ` ${ t ( 'Open document {{title}}' , { title : doc . title || untitledDocument } ) } ` }
59+ aria-label = { itemAriaLabel }
5260 >
5361 < Box
5462 $direction = "row"
@@ -90,7 +98,7 @@ export const SimpleDocItem = ({
9098 $css = { ItemTextCss }
9199 data-testid = "doc-title"
92100 >
93- { doc . title || untitledDocument }
101+ { docTitle }
94102 </ Text >
95103 { ( ! isDesktop || showAccesses ) && (
96104 < Box
@@ -101,7 +109,7 @@ export const SimpleDocItem = ({
101109 aria-hidden = "true"
102110 >
103111 < Text $size = "xs" $variation = "tertiary" >
104- { relativeDate ( doc . updated_at ) }
112+ { docRelativeUpdate }
105113 </ Text >
106114 </ Box >
107115 ) }
You can’t perform that action at this time.
0 commit comments