accessibilityLabel fix for RoomInfo

This commit is contained in:
Anant Bhasin 2021-06-15 15:49:31 +05:30
parent 4b91da0871
commit 39b1f9e7bc
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ import Navigation from '../../lib/Navigation';
const getRoomTitle = (room, type, name, username, statusText, theme) => (type === 'd' const getRoomTitle = (room, type, name, username, statusText, theme) => (type === 'd'
? ( ? (
<> <>
<Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]}>{ name }</Text> <Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]} accessibilityLabel={name}>{ name }</Text>
{username && <Text testID='room-info-view-username' style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]}>{`@${ username }`}</Text>} {username && <Text testID='room-info-view-username' style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]}>{`@${ username }`}</Text>}
{!!statusText && <View testID='room-info-view-custom-status'><Markdown msg={statusText} style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]} preview theme={theme} /></View>} {!!statusText && <View testID='room-info-view-custom-status'><Markdown msg={statusText} style={[styles.roomUsername, { color: themes[theme].auxiliaryText }]} preview theme={theme} /></View>}
</> </>
@ -42,7 +42,7 @@ const getRoomTitle = (room, type, name, username, statusText, theme) => (type ==
: ( : (
<View style={styles.roomTitleRow}> <View style={styles.roomTitleRow}>
<RoomTypeIcon type={room.prid ? 'discussion' : room.t} teamMain={room.teamMain} key='room-info-type' status={room.visitor?.status} /> <RoomTypeIcon type={room.prid ? 'discussion' : room.t} teamMain={room.teamMain} key='room-info-type' status={room.visitor?.status} />
<Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]} key='room-info-name'>{RocketChat.getRoomTitle(room)}</Text> <Text testID='room-info-view-name' style={[styles.roomTitle, { color: themes[theme].titleText }]} key='room-info-name' accessibilityLabel={RocketChat.getRoomTitle(room)}>{RocketChat.getRoomTitle(room)}</Text>
</View> </View>
) )
); );