View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vidéos

Ouvrir le menu Fermer le menu
  • Collections
  • Toutes les vidéos
  • À propos

Plus de vidéos

  • À propos
  • Code
  • Tailor the VoiceOver experience in your data-rich apps

    Learn how to present complex data through VoiceOver with the Accessibility Custom Content API. Discover how you can deliver accessibility information in a concise form, and only when someone wants it. We'll show you how you can integrate AXCustomContent and help people who want VoiceOver enabled to navigate your data-rich apps in an efficient manner.

    To get the most out of this session, you should be familiar with general accessibility principles and VoiceOver accessibility APIs available in Swift and SwiftUI.

    Ressources

    • Accessibility for Developers
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC23

    • Create accessible spatial experiences

    WWDC21

    • Thursday@WWDC21
  • Rechercher dans cette vidéo…
    • 5:03 - Accessibility Custom Content API Sample

      import UIKit
      import Accessibility
      
      class DogTableViewCell: UITableViewCell, AXCustomContentProvider {
      
          var coverImage: UIImageView!
          var name: UILabel!
          var type: UILabel!
          var desc: UILabel!
          var popularity: UILabel!
          var age: UILabel!
          var weight: UILabel!
          var height: UILabel!
          
          override var accessibilityLabel: String? {
              get {
                  guard let nameLabel = name.text else { return nil }
                  guard let typeLabel = type.text else { return nil }
                  return nameLabel + ", " + typeLabel
              }
              set { }
          }
      
          var accessibilityCustomContent: [AXCustomContent]! {
              get {
                  let notes = AXCustomContent(label: "Description", value: desc.text!)
                  let popularity = AXCustomContent(label: "Popularity", value: popularity.text!)
                  let age = AXCustomContent(label: "Age", value: age.text!)
                  let weight = AXCustomContent(label: "Weight", value: weight.text!)
                  let height = AXCustomContent(label: "Height" , value: height.text!)
                  return [age, popularity, weight, height, notes]
              }
              set { }
          }
      }
    • 6:49 - Accessibility Custom Content API Sample with importance property

      import UIKit
      import Accessibility
      
      class DogTableViewCell: UITableViewCell, AXCustomContentProvider {
      
          var coverImage: UIImageView!
          var name: UILabel!
          var type: UILabel!
          var desc: UILabel!
          var popularity: UILabel!
          var age: UILabel!
          var weight: UILabel!
          var height: UILabel!
          
          override var accessibilityLabel: String? {
              get {
                  guard let nameLabel = name.text else { return nil }
                  guard let typeLabel = type.text else { return nil }
                  return nameLabel + ", " + typeLabel
              }
              set { }
          }
      
          var accessibilityCustomContent: [AXCustomContent]! {
              get {
                  let notes = AXCustomContent(label: "Description", value: desc.text!)
                  let popularity = AXCustomContent(label: "Popularity", value: popularity.text!)
                  let age = AXCustomContent(label: "Age", value: age.text!)
                  age.importance = .high
                  let weight = AXCustomContent(label: "Weight", value: weight.text!)
                  let height = AXCustomContent(label: "Height" , value: height.text!)
                  return [popularity, age, weight, height, notes]
              }
              set { }
          }
      }
    • 7:47 - Accessibility Custom Content API Basic Sample in SwiftUI

      struct SampleView: View {
          var body: some View {
              VStack {
                  Text(name)
                  Text(description)
              }
              .accessibilityElement(children: .combine)
              .accessibilityCustomContent("Description", description, importance: .high)
          }
      }
    • 8:10 - Accessibility Custom Content API Sample in Swift UI

      import SwiftUI
      import Accessibility
      
      struct DogCell: View {
          var dog: Dog
          var body: some View {
              VStack {
                  HStack {
                      dog.image
                          .resizable()
                      VStack(alignment: .leading) {
                          Text(dog.name)
                              .font(.title)
                          Spacer()
                          Text(dog.type)
                              .font(.body)
                          Spacer()
                          Text(dog.description)
                              .fixedSize(horizontal: false, vertical: true)
                              .font(.subheadline)
                              .foregroundColor(Color(uiColor: UIColor.brown))
                              .accessibilityHidden(true)
                      }
                      Spacer()
                  }
                  .padding(.horizontal)
                  HStack(alignment: .top) {
                      VStack(alignment: .leading) {
                          HStack {
                              Text(dog.popularity)
                              Spacer()
                              Text(dog.age)
                              Spacer()
                              Text(dog.weight)
                              Spacer()
                              Text(dog.height)
                          }
                          .foregroundColor(Color(uiColor: UIColor.darkGray))
                          .accessibilityHidden(true)
                      }
                      Spacer()
                  }
                  .padding(.horizontal)
                  Divider()
              }
              .accessibilityElement(children: .combine)
              .accessibilityCustomContent("Age", dog.age, importance: .high)
              .accessibilityCustomContent("Popularity", dog.popularity)
              .accessibilityCustomContent("Weight", dog.weight)
              .accessibilityCustomContent("Height", dog.height)
              .accessibilityCustomContent("Description", dog.description)
          }
      }
    • 8:57 - Accessibility Custom Content API Sample with AccessibilityCustomContentKey in SwiftUI

      import SwiftUI
      import Accessibility
      
      extension AccessibilityCustomContentKey {
          static var age: AccessibilityCustomContentKey {
              AccessibilityCustomContentKey("Age")
          }
      }
      
      struct DogCell: View {
          var dog: Dog
          var body: some View {
              VStack {
                  HStack {
                      dog.image
                          .resizable()
                      VStack(alignment: .leading) {
                          Text(dog.name)
                              .font(.title)
                          Spacer()
                          Text(dog.type)
                              .font(.body)
                          Spacer()
                          Text(dog.description)
                              .fixedSize(horizontal: false, vertical: true)
                              .font(.subheadline)
                              .foregroundColor(Color(uiColor: UIColor.brown))
                              .accessibilityHidden(true)
                      }
                      Spacer()
                  }
                  .padding(.horizontal)
                  HStack(alignment: .top) {
                      VStack(alignment: .leading) {
                          HStack {
                              Text(dog.popularity)
                              Spacer()
                              Text(dog.age)
                              Spacer()
                              Text(dog.weight)
                              Spacer()
                              Text(dog.height)
                          }
                          .foregroundColor(Color(uiColor: UIColor.darkGray))
                          .accessibilityHidden(true)
                      }
                      Spacer()
                  }
                  .padding(.horizontal)
                  Divider()
              }
              .accessibilityElement(children: .combine)
              .accessibilityCustomContent(.age, dog.age, importance: .high)
              .accessibilityCustomContent("Popularity", dog.popularity)
              .accessibilityCustomContent("Weight", dog.weight)
              .accessibilityCustomContent("Height", dog.height)
              .accessibilityCustomContent("Description", dog.description)
          }
      }

Developer Footer

  • Vidéos
  • WWDC21
  • Tailor the VoiceOver experience in your data-rich apps
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines