Accessibility Role Definition
Interactive iOS elements must expose the correct accessibility traits so VoiceOver announces their role (button, link, switch, header) accurately.
WCAG Reference
Maps to: WCAG 4.1.2 Name, Role, Value | Applies to: WCAG 2.0, WCAG 2.1, WCAG 2.2 Introduced in: WCAG 2.0 | Level: A | Read the official specification →
What this rule checks
The scanner verifies that interactive elements have appropriate accessibilityTraits set, such as .button, .link, .header, .adjustable, or .selected, matching their actual behavior.
Why it matters
VoiceOver uses traits to tell users what kind of element they are interacting with and how to use it. Without the correct trait, users may not know they can tap, swipe, or adjust a control.
Common failure patterns
- custom interactive views with no
accessibilityTraitsset (defaults to.none) - links styled as buttons but missing
.linktrait - section headers in lists without
.headertrait - slider-like controls missing
.adjustabletrait
Remediation guidance
- set
accessibilityTraitson every interactive element to match its behavior - use
.buttonfor tappable controls,.linkfor navigation links,.headerfor section headings - for adjustable controls (sliders, steppers), set
.adjustableand implementaccessibilityIncrement()andaccessibilityDecrement() - in SwiftUI, use
.accessibilityAddTraits()to add the appropriate traits - test with VoiceOver and confirm the announced trait matches the element's behavior
