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

Accessibility & VoiceOver support #103

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

mathewa6
Copy link

Hello! Thanks for the library.

I noticed that currently, SwiftCharts isn't accessible to VoiceOver and other clients that use UIAccessibility. You can test this by turning on VoiceOver and running the example project, where it currently defaults to reading the X and Y axes labels.

This PR attempts to address this issue, by making the data contained in each chart accessible, using the UIAccessibilityContainer protocol. I've attempted to minimize changes to rendering and structure and have left comments describing additions. Changes are apparent when using the example project with VoiceOver running, otherwise there should be no visible changes. I've added 2 additional public properties: accessibilityXLabels and accessibilityYLabels. These allow the customization of labels to sound better to an audio interface. I've updated the StockChartsViewController to make use of both of them to demonstrate its effect.

Happy to make any changes!

mathewa6 added 6 commits June 29, 2018 18:52
Added filprivate property accessibilityChartElements which is used to
adhere to the UIAccessibilityContainer protocol methods. Rather than
render data twice, the methods used attempt to make
UIAccessibilityElements as they are drawn using existing functions in
SwiftChart.
@filippovdev
Copy link

I hope this will be merged, now I have the same task and will use this branch, thank you @mathewa6 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants