From 234e04c396eb38f8402cdc0601dd8e4eb849c7c2 Mon Sep 17 00:00:00 2001 From: Ollie H Date: Tue, 30 May 2023 13:39:50 -0700 Subject: Update follower/following a11y hints and labels (#755) * Update follower/following a11y hints and labels * Update ProfileHeader.tsx --------- Co-authored-by: Ansh --- src/view/com/profile/ProfileHeader.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index d5ae3a885..56036363c 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -289,6 +289,9 @@ const ProfileHeaderLoaded = observer( ]) const blockHide = !isMe && (view.viewer.blocking || view.viewer.blockedBy) + const following = formatCount(view.followsCount) + const followers = formatCount(view.followersCount) + const pluralizedFollowers = pluralize(view.followersCount, 'follower') return ( @@ -394,13 +397,13 @@ const ProfileHeaderLoaded = observer( style={[s.flexRow, s.mr10]} onPress={onPressFollowers} accessibilityRole="button" - accessibilityLabel={`Show ${view.handle}'s followers`} - accessibilityHint={`Shows folks following ${view.handle}`}> + accessibilityLabel={`${followers} ${pluralizedFollowers}`} + accessibilityHint={'Opens followers list'}> - {formatCount(view.followersCount)} + {followers} - {pluralize(view.followersCount, 'follower')} + {pluralizedFollowers} + accessibilityLabel={`${following} following`} + accessibilityHint={'Opens following list'}> - {formatCount(view.followsCount)} + {following} following -- cgit 1.4.1