Some good practices when it comes to charts and data visualizations: use high contrast colors, avoid problematic pairings (red-green, blue-yellow), use symbols as well as colors...

Four versions of the same chart. They're showing the monthly rainfall in inches and comparing tropical vs arid during the different months of the year. The first version has low contrast and it is difficult to read. The second one has higher contrast, so it will be easier to read by most. This is especially important if the Increase Contrast setting in iOS is on. But still, it is red for tropical and green for arid. Green-red is a problematic paring of colors and some users could perceive those colors very similarly, making it very difficult to differentiate which line in the graph is for tropical and which for arid. The third graph tries to simulate this perception, where both colors look yellow-ish to the user. The fourth chart uses green for tropical and blue for arid, but it also adds shapes along the line for specific months. It is much easier for everyone to differentiate both lines. Using shapes is especially important if the user has the Differentiate Without Color setting on.

You may also find interesting...

Second day of @a11yTO! And again, lots of talks with a ton of practical information. So here's a thread with some of my highlights. And very proud that @spotifydesign was one of the sponsors! #a11yTOconf

With accessibilityRepresentation(representation:), you can create a custom component and it can be perceived by assistive technologies as the view you pass as representation. No need to manually configure accessibility attributes. It is one of the most interesting additions to SwiftUI to help you develop accessible UI components. If your custom component behaves similarly to a native one, this is the way to go. https://developer.apple.com/documentation/swiftui/view/accessibilityrepresentation(representation:)

When implementing a UISlider, it is a good idea to consider how much the slider value should change when swiping up/down to adjust it. It might not always make sense to do it in 10% increments, which is the default behaviour. Could be because the value at those intervals doesn't make sense, or feel random, or because it wouldn't provide the user with a fine enough control being able to go through the whole slider in just 10 swipes. It user will still be able to adjust the slider to any value by double tapping and holding and then moving the finger left or right, bypassing VoiceOver gestures. VoiceOver announces the new value as it changes.

Created in Swift with Ignite.

Supporting Swift for Swifts