@@ -3,13 +3,16 @@ import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeed
33import { showContextMenuForReport , useShowContextMenuActions , useShowContextMenuState } from '@components/ShowContextMenuContext' ;
44
55import useEnvironment from '@hooks/useEnvironment' ;
6+ import useHover from '@hooks/useHover' ;
67import { useMemoizedLazyExpensifyIcons } from '@hooks/useLazyAsset' ;
78import useLocalize from '@hooks/useLocalize' ;
89import useTheme from '@hooks/useTheme' ;
910import useThemeStyles from '@hooks/useThemeStyles' ;
1011
1112import { openLink } from '@libs/actions/Link' ;
1213
14+ import variables from '@styles/variables' ;
15+
1316import CONST from '@src/CONST' ;
1417
1518import type { CustomRendererProps , TBlock , TNode } from 'react-native-render-html' ;
@@ -19,7 +22,7 @@ import {View} from 'react-native';
1922
2023import TableChildrenRenderer , { getElementChildren } from './TableChildrenRenderer' ;
2124import TableLinkColumnContext from './TableLinkColumnContext' ;
22- import { getRowLinkURL } from './TableRowLink' ;
25+ import { getRowLinkURL , getTextContent } from './TableRowLink' ;
2326
2427function isLastRowOfTable ( tnode : TNode ) : boolean {
2528 const section = tnode . parent ;
@@ -32,12 +35,21 @@ function isLastRowOfTable(tnode: TNode): boolean {
3235 return sectionRows . at ( - 1 ) === tnode && tableSections . at ( - 1 ) === section ;
3336}
3437
38+ /** The row read out as its cells, e.g. `Airbnb, 2026-06-02, £404.60`. */
39+ function getRowCellsText ( rowTnode : TNode ) : string {
40+ return getElementChildren ( rowTnode )
41+ . map ( ( cell ) => getTextContent ( cell ) . trim ( ) )
42+ . filter ( ( cellText ) => cellText . length > 0 )
43+ . join ( ', ' ) ;
44+ }
45+
3546function TableRowRenderer ( { tnode} : CustomRendererProps < TBlock > ) {
3647 const styles = useThemeStyles ( ) ;
3748 const theme = useTheme ( ) ;
3849 const { translate} = useLocalize ( ) ;
3950 const { environmentURL} = useEnvironment ( ) ;
4051 const icons = useMemoizedLazyExpensifyIcons ( [ 'ArrowRight' ] ) ;
52+ const { hovered, bind} = useHover ( ) ;
4153 const { anchor, report, action, originalReportID} = useShowContextMenuState ( ) ;
4254 const { onShowContextMenu, checkIfContextMenuActive} = useShowContextMenuActions ( ) ;
4355
@@ -57,7 +69,9 @@ function TableRowRenderer({tnode}: CustomRendererProps<TBlock>) {
5769 < Icon
5870 src = { icons . ArrowRight }
5971 fill = { theme . icon }
60- size = { CONST . ICON_SIZE . SMALL }
72+ additionalStyles = { ! hovered && styles . opacitySemiTransparent }
73+ width = { variables . iconSizeNormal }
74+ height = { variables . iconSizeNormal }
6175 />
6276 ) }
6377 </ View >
@@ -79,10 +93,12 @@ function TableRowRenderer({tnode}: CustomRendererProps<TBlock>) {
7993 onPress = { ( ) => openLink ( rowLinkURL , environmentURL ) }
8094 onLongPress = { ( event ) => onShowContextMenu ( ( ) => showContextMenuForReport ( event , anchor , report ?. reportID , action , checkIfContextMenuActive , originalReportID ) ) }
8195 role = { CONST . ROLE . BUTTON }
82- accessibilityLabel = { translate ( 'iou.viewDetails' ) }
96+ accessibilityLabel = { getRowCellsText ( tnode ) || translate ( 'iou.viewDetails' ) }
97+ accessibilityHint = { translate ( 'iou.viewDetails' ) }
8398 sentryLabel = { CONST . SENTRY_LABEL . HTML_RENDERER . TABLE_ROW }
8499 shouldUseHapticsOnLongPress
85100 isNested
101+ { ...bind }
86102 >
87103 < TableChildrenRenderer tnode = { tnode } />
88104 { chevron }
0 commit comments