Accessibility up to 11! LogoAccessibility up to 11!
  • Blog
  • #365DaysIOSAccessibility
  • Apps
  • About
  • Resources
  • RSS
#365DaysIOSAccessibility

Day 2

20 May 2022

Accessibility ModifiersSwiftUIUIAccessibilityUIKit

By

Daniel Devesa Derksen-Staats

SwiftUI has equivalent accessibility modifiers for some of UIAccessibility's properties in UIKit. Same basic concepts apply.

Label: https://developer.apple.com/documentation/swiftui/view/accessibilitylabel(:)-9ek2h

Value: https://developer.apple.com/documentation/swiftui/view/accessibilityvalue(:)-8esl7

Traits: https://developer.apple.com/documentation/swiftui/view/accessibilityaddtraits(:)

Hint: https://developer.apple.com/documentation/swiftui/view/accessibilityhint(:)-3i2vu

You may also find interesting...

Day 1

UIAccessibility is the cornerstone of any accessible UIKit app. Among others, understanding what an accessibility label, value, trait or hint are, is key. This is an example of how they could be configured for a custom rating component. #GAAD2022

GAADGAAD2022UIAccessibilityUIKitaccessibilityLabel

Day 181

There are a ton of things to love about SwiftUI. But one of my favorites it's got to be the possibility of previewing Variants: the possibility of seeing your UI in dark/light modes, all dynamic type sizes, and orientations, side-by-side.

Dynamic TypeSwiftUI

Day 94

Creating UIAccessibilityElements, combined with a semanticGroup accessibilityContainerType, can also help you make components as complex as charts accessible. Example from "Bring Accessibility to Charts" WWDC21: https://developer.apple.com/videos/play/wwdc2021/10122/

UIAccessibilityWWDCaccessibilityContaineraccessibilityElementaccessibilityElementsiOS

Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details


← Day 3
Day 1 →

Created in Swift with Ignite.

Content: CC BY 4.0 • Details

Supporting Swift for Swifts