Open jordibruin opened 2 years ago
I've started working on this in PR #28. As I bring up in the PR, do we think it's worth differentiating between the accessibility of the simple and detail charts in this repo?
i.e in a real app - it doesn't make sense to have VoiceOver users traverse all data points when the chart is in a cell. So for this repo the 2 options are :
accessibilityLabel
and accessibiiltyValue
for both simple and detail chart viewsaccessibilityLabel
and accessibiiltyValue
for detail views only and accessibilityChartDescriptor
for simple views to allow skimming of data for VoiceOver usersI would say let’s go for the second option there!
Awesome thanks for the direction- I'm on it!
Just a heads up though - it would seem that labels and values are ignored in the current seed. This captioned video shows the current 2 bar layout in the main branch that was created with label/value but it still defaults to the inferred/internal label.
If anyone wants to verify this behavior, I can file some feedback.
EDIT: This seems to occur in Accessibility Inspector as well - replace the dynamic label/value in TwoBarsSimpleDetailView
with a string literal still shows the inferred labels. If it's working for anyone, do let me know
EDIT 2: This is an iOS 16 issue force rebooting the device fixes it!
https://user-images.githubusercontent.com/5402357/173678430-635ae2f1-a310-4d05-b549-42a7e2716894.mov
The descriptions in that video are not great yet. We’ll have to figure out how to say the correct thing! 🤔
I’ll look at Apple’s example soon but there they say something like: Monday, Cupertino sales 150, San Jose sales 120
Oh I agree - the video is the issue I referred to above and those are the inferred default system labels. If you can reproduce, try restarting the device. However it does seem to recur.
I believe the labels we set for each bar does state the city, sales closer to your example 🙂
Adding simple accessibility labels and values goes a long way in making it the standard for people when they use these charts as examples.
Please add these to your sample charts: .accessibilityLabel("(element.ageRange)") .accessibilityValue("(element.percentage)")