From bdda3020f6ef8ef130580eb458ed734ae55b54ad Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 21 Jan 2025 12:05:46 -0600 Subject: Some immersive video a11y fixes (#7528) * Add playing/paused handling to tap area * Show text and remove expand button if screen reader enabled * Clarify actions * DRY --- src/screens/VideoFeed/index.tsx | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 21b2ec5be..7453aa5d4 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -21,6 +21,7 @@ import { useSafeAreaFrame, useSafeAreaInsets, } from 'react-native-safe-area-context' +import {useEvent} from 'expo' import {useEventListener} from 'expo' import {Image, ImageStyle} from 'expo-image' import {LinearGradient} from 'expo-linear-gradient' @@ -52,6 +53,7 @@ import {sanitizeDisplayName} from '#/lib/strings/display-names' import {cleanError} from '#/lib/strings/errors' import {sanitizeHandle} from '#/lib/strings/handles' import {isAndroid} from '#/platform/detection' +import {useA11y} from '#/state/a11y' import {POST_TOMBSTONE, Shadow, usePostShadow} from '#/state/cache/post-shadow' import {useProfileShadow} from '#/state/cache/profile-shadow' import { @@ -140,7 +142,7 @@ export function VideoFeed({}: NativeStackScreenProps<
@@ -692,6 +694,7 @@ function Overlay({ text: record?.text || '', facets: record?.facets, }) + const handle = sanitizeHandle(post.author.handle, '@') const animatedStyle = useAnimatedStyle(() => ({ opacity: 1 - seekingAnimationSV.get(), @@ -731,11 +734,13 @@ function Overlay({ - + {player && ( + + )} - {sanitizeHandle(post.author.handle, '@')} + {handle} @@ -785,8 +790,8 @@ function Overlay({ ) -- cgit 1.4.1