DEV Community

Filip Němeček
Filip Němeček

Posted on

Built a tool for iOS developers to help making texts accessible for everyone

Prelude

iOS offers amazing text accessibility options thanks to Dynamic Type. This is basically set of predefined font styles by Apple that takes into account font settings set globally for iOS.

It is simple to use. Let’s say in my fictional app there is some headline content and I want it to stand out from the rest of the text. The traditional way would be to sent static font size, maybe 36pt and semibold style. The Dynamic Type way is to set Text Style to maybe Title 1 and let system take care of the rest.

With Dynamic Type you don’t define sizes and weights to your text but instead specify what they signify. We have options to set body style, caption style and so much more. It is also automatically updated if you allow it either in Interface Builder or in code.

If you use Dynamic Type in your app, you don’t have to do much else to have really accessible text for your users. System will automatically adjust sizes.

It is not there only for visually impaired folks, some prefer smaller sizes so more text can be display. With Dynamic Type system will take care of this as well.

Dynamic Type Reference

I hope I managed to outline the main benefits of Dynamic Type. One of the barrier of using it may be that you don’t necessarily know how will the less used styles scale either up or down. It is easy to remember how will Body or Title 1 look across different scales but less so for styles like Callout or Caption 2.

That is why I built my Dynamic Type Reference app. Together with Accessibility Inspector on your Mac you can run it in simulator and easily preview different styles with different sizes. Check out the GIF below:

Dynamic Type Reference app in action

There is also option to preview custom text. The app is available as open source on GitHub.

I will be happy if it helps you making your app more accessible to variety of folks.

If you have any questions, comments or suggestions please let me know either here, on GitHub or via Twitter.

Thanks for reading!

Top comments (0)