This is a short recap of the most important points for a successful implementation of the accessibility features provided by iOS. For a more in depth guideline, you can go to:
We also have a fast guide on how to use VoiceOver
- Avoid constraining the height of a
UILabel,UIButton, or any view that has aUILabelor aUIButtonas a child view. - In cases where a minimum height is necessary, use a constraint relation
greaterThanOrEqualTo. - In most cases for
UIButtoninstances, setting.contentEdgeInsetstop and bottom will be enough to get a minimum height. - Using
UIStackViewmakes it easier to create layouts that grow automatically with dynamic type. - If you need insets in
UIStackView, you can usestackView.layoutMarginsinstead of setting height constraints. - Get fonts from
WPStyleGuide+DynamicType. - Don't forget to set
adjustsFontForContentSizeCategory = true. - If you need a font with a special weight or trait (i.e.
italic), remember to refresh the fonts when the user changes the content size category.
- Follow the self-sizing cell rules for layout and setup.
- Use dynamic fonts.
- Set
adjustsFontForContentSizeCategory = truein labels and buttons. - Everything should be working already!
Be careful with static tables.
- To test the new (or modified) UI with VoiceOver is the best we can do to ensure a good adoption of this feature.
- Add accessibility labels to elements with not enough text-based information (i.e a button with just a number or an image).
- For complex UI elements that represent one unit of information, make that unit a single VoiceOver element with a label that explains its content as we would explain it to another person.