Skip to content

Commit b320831

Browse files
committed
fix(intro-screen-native): fix talkback/voiceover for pagination
1 parent 4915387 commit b320831

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

packages/pluggableWidgets/intro-screen-native/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue with the TalkBack/VoiceOver traversal in the IntroScreen widget, where the order was not correct.
12+
913
## [4.3.0] - 2026-4-9
1014

1115
### Changed

packages/pluggableWidgets/intro-screen-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "intro-screen-native",
33
"widgetName": "IntroScreen",
4-
"version": "4.3.0",
4+
"version": "4.3.1",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

packages/pluggableWidgets/intro-screen-native/src/SwipeableContainer.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,19 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
124124
};
125125

126126
const renderItem = useCallback(
127-
({ item }: any): ReactElement => {
128-
return <View style={[{ width }, { height }]}>{item.content}</View>;
127+
({ item, index }: any): ReactElement => {
128+
const isActive = index === activeIndex;
129+
return (
130+
<View
131+
style={[{ width, flex: 1 }]}
132+
importantForAccessibility={isActive ? "auto" : "no-hide-descendants"}
133+
accessibilityElementsHidden={!isActive}
134+
>
135+
{item.content}
136+
</View>
137+
);
129138
},
130-
[width, height]
139+
[width, height, activeIndex]
131140
);
132141

133142
const renderButton = (
@@ -284,6 +293,9 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
284293
: props.styles.dotStyle
285294
]}
286295
onPress={() => onPaginationPress(i)}
296+
accessibilityRole="button"
297+
accessibilityLabel={`Go to slide ${i + 1}`}
298+
accessibilityState={{ selected: rtlSafeIndex(i) === activeIndex }}
287299
/>
288300
))}
289301
{!hidePagination && paginationOverflow && (
@@ -356,9 +368,10 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
356368
renderItem={renderItem}
357369
onMomentumScrollEnd={onMomentumScrollEnd}
358370
scrollEventThrottle={50}
359-
extraData={width}
371+
extraData={[width, activeIndex]}
360372
onLayout={onLayout}
361373
keyExtractor={(_: any, index: number) => "screen_key_" + index}
374+
importantForAccessibility="no"
362375
/>
363376
{renderPagination()}
364377
</View>

packages/pluggableWidgets/intro-screen-native/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="IntroScreen" version="4.3.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="IntroScreen" version="4.3.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="IntroScreen.xml" />
66
</widgetFiles>

0 commit comments

Comments
 (0)