From ce6720014ecd13652939ae47643033be2670ca33 Mon Sep 17 00:00:00 2001 From: Matthew Guest - Work Date: Wed, 18 Dec 2024 14:23:24 -0800 Subject: [PATCH 1/3] Added accessibility prop to a View on the FeatureLandingAndChildTemplate component which will allow keyboard access users to navigate further down a page. Previously screens that used this component didnt allow users to scroll down with keyboard access because the initial view didnt have an accessible element to navigate to, this fixes that. --- .../src/components/Templates/FeatureLandingAndChildTemplate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx index 018c30dc54..c164a4652b 100644 --- a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx +++ b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx @@ -143,7 +143,7 @@ export const ChildTemplate: FC = ({ transitionHeader(event.nativeEvent.contentOffset.y) }} {...scrollViewProps}> - + {!screenReaderEnabled ? {title} : null} {children} From acb8d1a1d42edfa29558fb238fd8aa717d2919be Mon Sep 17 00:00:00 2001 From: Matthew Guest - Work Date: Wed, 18 Dec 2024 14:49:36 -0800 Subject: [PATCH 2/3] Added different accessibility label text to avoid breaking tests. --- .../src/components/Templates/FeatureLandingAndChildTemplate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx index c164a4652b..d53e3c0ebc 100644 --- a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx +++ b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx @@ -143,7 +143,7 @@ export const ChildTemplate: FC = ({ transitionHeader(event.nativeEvent.contentOffset.y) }} {...scrollViewProps}> - + {!screenReaderEnabled ? {title} : null} {children} From 3fcee7f2f893712856d47071ccd0fcbce15c5af2 Mon Sep 17 00:00:00 2001 From: Matthew Guest - Work Date: Wed, 18 Dec 2024 15:48:38 -0800 Subject: [PATCH 3/3] Fixed edge case where if screenreader boolean is true then we would display null which would break the keyboard access logic. To combat this while still preserving the intent of the original code I opted to make a TextView with a zero-width space character so the TextView is still treated like an actionable item and still allows navigation of the page with keyboard access. Also, fixed formatting. Making this change allows keyboard navigation to work regardless if user has screenreader enabled or not. --- .../src/components/Templates/FeatureLandingAndChildTemplate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx index d53e3c0ebc..d9f0c63224 100644 --- a/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx +++ b/VAMobile/src/components/Templates/FeatureLandingAndChildTemplate.tsx @@ -144,7 +144,7 @@ export const ChildTemplate: FC = ({ }} {...scrollViewProps}> - {!screenReaderEnabled ? {title} : null} + {!screenReaderEnabled ? {title} : {'\u200B'}} {children}