Skip to content

Commit 1d2767b

Browse files
dohoooAlexJackson01
andauthored
Release: accessibility improvements and documentation updates (#834)
* docs: update homepage field of package.json * docs: add comprehensive programmatic control documentation (#833) - Add new 'Programmatic Control' page with detailed API reference - Include practical examples for pagination, navigation, dynamic content - Clarify difference between controlled components and imperative API - Update migration guide to use correct terminology - Add warnings about race conditions and timing considerations Fixes #822 * feat: add accessibility support to pagination components (#832) - Add comprehensive a11y props to Basic and Custom pagination components - Add carouselName prop for descriptive accessibility labels - Replace TouchableWithoutFeedback with Pressable - Improve screen reader support with proper labeling Co-authored-by: AlexJackson01 <[email protected]> * fix: replace TouchableWithoutFeedback with Pressable in pagination (#831) - Replace deprecated TouchableWithoutFeedback with Pressable in Basic PaginationItem - Replace deprecated TouchableWithoutFeedback with Pressable in Custom PaginationItem - Maintains same functionality while using modern React Native API - Removes deprecation warnings Closes #812 * fix: correct TypeScript syntax in useCarouselController test Fix ReturnType<typeof useSharedValue<number>> to ReturnType<typeof useSharedValue> to resolve build error --------- Co-authored-by: AlexJackson01 <[email protected]>
1 parent 20dc0b1 commit 1d2767b

File tree

12 files changed

+440
-10
lines changed

12 files changed

+440
-10
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"react-native-reanimated-carousel": patch
3+
---
4+
5+
Add accessibility support to pagination components and replace deprecated TouchableWithoutFeedback with Pressable
6+
7+
- Add comprehensive accessibility props (accessibilityLabel, accessibilityRole, accessibilityHint, accessibilityState) to both Basic and Custom pagination components
8+
- Add carouselName prop to allow descriptive accessibility labels
9+
- Replace TouchableWithoutFeedback with Pressable to remove deprecation warnings
10+
- Improve screen reader support with proper labeling and state information
11+
12+
Co-authored-by: AlexJackson01 <[email protected]>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"react-native-reanimated-carousel": patch
3+
---
4+
5+
Add comprehensive programmatic control documentation
6+
7+
- Add new "Programmatic Control" documentation page with detailed examples
8+
- Clarify that there's no React-style controlled component mode
9+
- Update migration guide to use correct terminology and link to new docs
10+
- Provide examples for common use cases: pagination, navigation buttons, dynamic content, auto-advance, and jump-to-item patterns
11+
- Include warnings about race conditions and timing considerations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"react-native-reanimated-carousel": patch
3+
---
4+
5+
Replace deprecated TouchableWithoutFeedback with Pressable in pagination components
6+
7+
Fixes deprecation warnings by replacing TouchableWithoutFeedback with the recommended Pressable component in both Basic and Custom pagination items. This change maintains the same functionality while using the modern React Native API.
8+
9+
Closes #812

.changeset/shy-walls-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-native-reanimated-carousel": patch
3+
---
4+
5+
Update homepage in package.json

example/website/pages/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"index": "Getting Started",
33
"props": "Props",
44
"usage": "Usage",
5+
"programmatic-control": "Programmatic Control",
56
"Examples": "Examples",
67
"custom-animations": "Custom Animations",
78
"concepts": "How it works?",

example/website/pages/migration-v4.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,15 @@ The `defaultIndex` prop behavior has changed:
226226
<Carousel defaultIndex={index} />
227227

228228
// After (v4.x) - subsequent defaultIndex changes are ignored
229-
// Use controlled mode if you need to programmatically change the index
229+
// Use programmatic control if you need to change the index after mount
230230
<Carousel
231231
defaultIndex={index} // Only initial value is considered
232+
ref={carouselRef}
232233
/>
234+
235+
// To change index programmatically, use the ref:
236+
// carouselRef.current?.scrollTo({ index: newIndex, animated: true })
237+
// See: /programmatic-control for detailed examples
233238
```
234239

235240
## Migration Steps

0 commit comments

Comments
 (0)