Accessibility & localization cheat sheet
The 6 Accessibility & localization interview answers in 30 seconds each, plus quick facts. Printable, free.
One page per topic: print it or save it as PDF from your browser's print menu. Practise these questions
Supporting VoiceOver
Give every meaningful element a concise label that says what it is, add a value for state, and a hint only when the result of an action isn't obvious. Hints describe the result, such as 'Adds the item to your cart', not the gesture, because VoiceOver already announces how to activate. Use traits (button, header, selected), group related elements, hide decorative images, and test with VoiceOver on a device.
Supporting Dynamic Type
Use text styles (.font(.body) in SwiftUI, UIFont.preferredFont(forTextStyle:) with adjustsFontForContentSizeCategory in UIKit) so text follows the user's size. Scale custom sizes, such as icons and padding, with @ScaledMetric or UIFontMetrics. Let text wrap, and switch horizontal layouts to vertical at accessibility sizes using dynamicTypeSize.isAccessibilitySize or ViewThatFits.
Localizing an iOS app
Put every user-facing string in a String Catalog, with comments for translators, and never build sentences by concatenation. Format dates, numbers, currencies, measurements and lists with FormatStyle so they follow the user's locale. Support plurals and right-to-left layouts, localize App Store metadata, and test with pseudolanguages and real translations.
String Catalogs and plurals
A String Catalog (.xcstrings, Xcode 15) is one file holding every localizable string and its translations. Xcode extracts strings from Text("…"), String(localized:) and LocalizedStringResource as you build, and tracks which ones are new, stale or untranslated. For counts, interpolate the number and add plural variations, so each language gets its own forms (Arabic has six, Japanese has one).
Making a custom card accessible
Combine the card into one accessibility element with a clear label (title, key details, state) so VoiceOver reads it in one stop, and expose its secondary buttons as custom actions. Give it the button trait if tapping opens it. Use text styles and let the layout reflow vertically at accessibility sizes, keep tap targets at least 44 by 44 points, and check contrast in light and dark mode.
Right-to-left languages
Lay out with leading and trailing, never left and right, so the interface mirrors automatically in Arabic and Hebrew. Use SF Symbols with directional variants (such as chevron.backward) and mark custom directional images to flip. Don't flip things that aren't directional, such as media playback controls, clocks or logos, and keep numbers and phone numbers readable. Test with the right-to-left pseudolanguage.
Quick facts
- Accessibility Inspector
- An Xcode tool that inspects elements' labels, traits and values, and audits screens for common problems.
- Minimum tap target
- Apple's guidance is at least 44 × 44 points for tappable controls.
- Pseudolanguages
- Scheme options such as Double-Length and Right-to-Left test layouts before translations exist.