Skip to content

Commit

Permalink
Fixed edge case where if screenreader boolean is true then we would d…
Browse files Browse the repository at this point in the history
…isplay 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.
  • Loading branch information
Matthew Guest - Work authored and Matthew Guest - Work committed Dec 18, 2024
1 parent acb8d1a commit 3fcee7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const ChildTemplate: FC<ChildTemplateProps> = ({
}}
{...scrollViewProps}>
<View accessible accessibilityLabel={titleA11y} onLayout={getTransitionHeaderHeight}>
{!screenReaderEnabled ? <TextView {...subtitleProps}>{title}</TextView> : null}
{!screenReaderEnabled ? <TextView {...subtitleProps}>{title}</TextView> : <TextView>{'\u200B'}</TextView>}
</View>
<WaygateWrapper>{children}</WaygateWrapper>
</VAScrollView>
Expand Down

0 comments on commit 3fcee7f

Please sign in to comment.