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
  • Bring accessibility to charts in your app

    Charts are an essential tool for understanding data, and critical to understanding ourselves, our health, our finances, and our world. Find out how you can make charts accessible in your apps to people with vision impairments through audio graphs and sonified data. And we'll show you how to improve your charts for accessibility through universal design principles and system accessibility settings.

    Ressources

    • Appearance Effects and Motion
    • Color and Contrast
    • isReduceMotionEnabled
    • accessibilityReduceMotion
    • Audio graphs
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC21

    • SwiftUI Accessibility: Beyond the basics
  • Rechercher dans cette vidéo…
    • 10:47 - Chart Model

      class ChartView: UIView {
          let model: ChartModel
      
          func drawChart() {
              // ...
          }
      }
      
      struct ChartModel {
          let title: String
          let dataPoints: [DataPoint]
              
          struct DataPoint {
              let name: String
              let x: Double
              let y: Double
          }
      }
    • 10:48 - ChartView

      extension ChartView {
          public override var accessibilityContainerType: UIAccessibilityContainerType { … }
          public override var accessibilityLabel: String? { … }
      
          public override var accessibilityElements: [Any]? {
              get {
                  return model.dataPoints.map { point in
                      let axElement = UIAccessibilityElement(accessibilityContainer: self)
                      axElement.accessibilityValue = "\(point.x) cups, \(point.y) lines of code"
                      axElement.accessibilityFrameInContainerSpace = frameRect(for: point)
                      return axElement
                  }
              }
              set {}
          }
        
       private func frameRect(for dataPoint: DataPoint) -> CGRect {
    • 14:23 - Basic chart definition example

      struct ChartModel {
          let title: String
          let summary: String
          let xAxis: Axis
          let yAxis: Axis
          let data: [DataPoint]
      
          struct Axis {
              let title: String
              let range: ClosedRange<Double>
          }
          
          struct DataPoint {
              let name: String
              let x: Double
              let y: Double
          }
      }
    • 15:08 - Enabling Audio Graphs

      import Accessibility
      
      extension ChartView: AXChart {
      
      public var accessibilityChartDescriptor: AXChartDescriptor? {
          get {
          }
          set {}
          }
      }
    • 15:35 - Chart Descriptor- Basic

      public var accessibilityChartDescriptor: AXChartDescriptor? {
          get {
              let xAxis = AXNumericDataAxisDescriptor( … ) 
              let yAxis = AXNumericDataAxisDescriptor(title: model.yAxis.title,
                                                      range: model.yAxis.range,
                                                      gridlinePositions:[],
                                                      valueDescriptionProvider: { value in
                  return "\(value) lines of code"
              })
          }
          set {}
      }
    • 16:55 - Chart Descriptor- Continued

      public var accessibilityChartDescriptor: AXChartDescriptor? {
          get {
              let xAxis = AXNumericDataAxisDescriptor( … )
              let yAxis = AXNumericDataAxisDescriptor( … )
              let series = AXDataSeriesDescriptor( … )
              return AXChartDescriptor(title: model.title,
                                       summary: model.summary,
                                       xAxis: xAxis,
                                       yAxis: yAxis,
                                       additionalAxes: [],
                                       series: [series])
          }
          set {}
      }

Developer Footer

  • Vidéos
  • WWDC21
  • Bring accessibility to charts in your app
  • 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