FormidableLabs / FormidableLabs/react-native-ama
VoiceOver/TalkBack items inside Carousel/Flatlist
- Vorherrschende Sprache
- TypeScript
- Sterne
- 295
- Forks
- 22
- Ø Merge
- 20 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
### Question
Hello, love your project! Although I can't find the way to VoiceOver items inside the Carousel. It captures the entire carousel and says that user has to swipe up or down to navigate through the carousel but in my opinion it would be nice to read the content of the focused item. Something like this:
```markdown
import { Carousel } from '@react-native-ama/extras';
import { Text } from '@react-native-ama/react-native';
import { View } from 'react-native';
const Component = () => {
const data = [
{ header: 'Title 1', text: 'Text 1' },
{ header: 'Title 2', text: 'Text 2' },
{ header: 'Title 3', text: 'Text 3' },
];
const flatListRef = React.useRef>(null);
const renderItem: ListRenderItem<(typeof data)[number]> = ({ item }) => {
return (
item.header
item.text
);
};
return (
{
const value = event.nativeEvent.actionName === 'increment' ? 1 : -1;
const newIndex = carouselIndexForScreenReader.current + value;
carouselIndexForScreenReader.current = clamp(newIndex, 0, data.length - 1);
flatListRef.current?.scrollToIndex({
index: carouselIndexForScreenReader.current,
});
}}
/>
);
};
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.