Closed andrewTaylor2 closed 4 years ago
ahh! a11y is important and I totally missed it ๐คฆ
Will work on it and update soon .. Thanks for raising the issue
@andrewTaylor2 I have been pretty busy recently. Today only I got some time off to work on a11y.
So reg. a11y.... It was actually a bit tricky as we use background and foreground (colored) icons, So when screen reader is ON, on swipe it was focusing on both icons whereas we want it only on background icons. Else it just focuses and announce same label twice.
But still could manage it, see if you could take a pull the branch and test it.
Also once tapped by user, you may add a custom <Text>
component with accessibilityLiveRegion="polite"
. This will announce user what he just selected.
Something like:
const [rating, setRating] = useState(0);
...
...
...
return (
<View style={styles.card}>
<Rating
rated={rating}
totalCount={5}
ratingColor="#f1c644"
ratingBackgroundColor="#d4d4d4"
size={32}
icon="add-circle"
direction="column"
onIconTap={pos => setRating(pos)}
/>
<Text accessibilityLiveRegion="polite" accessibilityLabel={`Rating selected ${rating} out of 5`}>{rating}/5 (200)</Text>
</View>
);
and in end for readonly ratings, it would be better if you could wrap it around your custom View
and add a11y labels to it. This way you will have full control for readonly ratings.
Thank you for taking time off and working on this issue. I just forked and tested the branch, it working as expected in my android device ๐
When we can expect release for this feature?
a11y ready release v5.3.4 Closing the issue, feel free to reopen
Thanks for release๐
Before raising issue, first thanks for creating this library. ๐
During usage of library, I found that when talkback is active,
Thanks!