iOS Typography design system in Swift: Accessibility support

iOS Typography design system in Swift: Accessibility support
image by Miloskiy

To be prepared to implement advanced Typography management with Accessibility support I recommend to read my previous article about Basic typography design system in Swift or quickly look at summary gist.

This article should explain why accessibility support is important and how to implement it in your app.


Accessibility support

Perhaps you’re already familiar with Dynamic Type feature that let users to choose the text size that works for them.

iOS Typography design system in Swift: Accessibility support
Settings → Accessibility → Display & Text Size → Larger Text

It helps users who need larger text for better readability. It also accommodates those who can read smaller text, allowing more information to appear on the screen. Apps that support Dynamic Type also provide a more consistent reading experience

Of course, providing comfortable reading experience throughout the app requires some effort from developer perspective.

This is what you should do:

maxPointSizeScaleFactor helps to control scaling bounds to prevent the breaking of layout.

Final touch

If user change accessibility setting while using your app all fonts will be updated after relaunch of the app. Of course the chance of this is pretty low but still exist. So to give user feedback that font settings were changed you need to do some extra work.

To update all your fonts automatically when the device’s content size category changes you have to override traitCollectionDidChange in your UIViewController or UIView:

Conclusion

Thanks for the reading! Now you can make your app more user friendly!

You can check full Typography management example here.

You might also view my app and how I used approach described above.

In case if you have any questions, suggestions or want to share your experience with me: LinkedIn, Facebook, Instagram ✉️