SwiftChart icon indicating copy to clipboard operation
SwiftChart copied to clipboard

Accessibility & VoiceOver support

Open mathewa6 opened this issue 6 years ago • 1 comments

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 avatar Jun 30 '18 17:06 mathewa6

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

filippovdev avatar Feb 26 '19 08:02 filippovdev