Activity 1
Audit a learning card
Inspect label, value, traits, focus order, actions, hit target, contrast, and large-text layout with VoiceOver enabled.
Hint: Navigate and activate the card without looking at the screen.
UIKit Development
Build UIKit experiences that remain understandable and usable across assistive technologies, content sizes, and environments.
Before you begin
Learning stage
Accessibility begins with semantic UIKit controls and a logical hierarchy. Add labels that identify, values that communicate current state, hints only when the action is unclear, and traits that accurately describe behavior. Combine children when they form one meaningful unit; expose custom actions when important actions would otherwise be hidden.
Dynamic Type is both font selection and flexible layout. Use preferred text styles, enable automatic adjustment for custom text labels, and avoid fixed heights around text. Larger sizes may require a horizontal row to become vertical or secondary decoration to yield space without removing essential content.
Trait collections describe environment characteristics such as size classes, display scale, interface style, and accessibility contrast. Adapt to actual content space and registered trait changes where appropriate. Also test right-to-left layout, Reduce Motion, increased contrast, pointer/keyboard access, VoiceOver order, and meaningful focus after transitions.
Learning stage
An accessible progress card groups related text and exposes one clear value and action.
final class ProgressCardView: UIControl {
private let titleLabel = UILabel()
private let progressLabel = UILabel()
override init(frame: CGRect) {
super.init(frame: frame)
isAccessibilityElement = true
accessibilityTraits = [.button]
titleLabel.font = .preferredFont(forTextStyle: .headline)
titleLabel.adjustsFontForContentSizeCategory = true
titleLabel.numberOfLines = 0
progressLabel.font = .preferredFont(forTextStyle: .body)
progressLabel.adjustsFontForContentSizeCategory = true
}
required init?(coder: NSCoder) { fatalError("Use init(frame:)") }
func configure(title: String, completed: Int, total: Int) {
titleLabel.text = title
progressLabel.text = "(completed) of (total) complete"
accessibilityLabel = title
accessibilityValue = "(completed) of (total) lessons complete"
accessibilityHint = "Opens the course"
}
}Learning stage
Connect the UIKit concept to complete, maintainable application features.
Learning stage
Identify lifecycle, ownership, identity, layout, accessibility, and user-experience risks.
Learning stage
Build the behavior in a small Xcode project and inspect it across realistic states.
Activity 1
Inspect label, value, traits, focus order, actions, hit target, contrast, and large-text layout with VoiceOver enabled.
Hint: Navigate and activate the card without looking at the screen.
Activity 2
Make a title-and-button row switch from horizontal to vertical when text or width requires it.
Hint: Test long localization and accessibility content sizes, not only device rotation.
Learning stage
Answer each question before revealing the explanation.
QUESTION 1
The label identifies the element; the value communicates its current state
For a progress control, the course name can be the label and completion can be the value.
QUESTION 2
No. The layout must also expand or reflow without clipping, overlap, or hidden actions.
Accessibility sizes stress the full hierarchy, not only font selection.
Learning stage
Explain the design in terms of lifecycle, identity, ownership, system behavior, and trade-offs.
Short answer: Start with semantic controls, then verify metadata, flexible layout, focus, actions, and complete tasks using assistive technologies.
I prefer native semantics, expose concise labels and current values, support Dynamic Type and sufficient targets, and adapt to content and available space. I test VoiceOver order and actions, keyboard and Switch Control access, contrast, Reduce Motion, localization, and focus after updates.
Possible follow-ups
Learning stage
Accessible UIKit interfaces combine correct semantics with flexible content and environment-aware behavior, verified through complete task-based testing.