Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all charts accessible #24

Open
jordibruin opened this issue Jun 13, 2022 · 5 comments
Open

Make all charts accessible #24

jordibruin opened this issue Jun 13, 2022 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jordibruin
Copy link
Owner

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)")

@jordibruin jordibruin added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jun 13, 2022
@mathewa6
Copy link
Contributor

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 views
  • accessibilityLabel and accessibiiltyValue for detail views only and accessibilityChartDescriptor for simple views to allow skimming of data for VoiceOver users

@jordibruin
Copy link
Owner Author

I would say let’s go for the second option there!

@mathewa6
Copy link
Contributor

mathewa6 commented Jun 14, 2022

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!

RPReplay_Final1655235781.mov

@jordibruin
Copy link
Owner Author

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

@mathewa6
Copy link
Contributor

mathewa6 commented Jun 17, 2022

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 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants