# 32 : Recognize the Importance of Accessibility Before It's Needed

Published on

Get weekly handpicked updates on Swift and SwiftUI!

Weekly Comment

May 16th (the third Thursday of May every year) marks this year’s Global Accessibility Awareness Day (GAAD). This annual event aims to remind developers, designers, and related professionals to focus on the accessibility of their digital products and services. The event emphasizes that accessibility in technology is crucial for people with disabilities, as it enables them to use websites, applications, and various digital devices more conveniently.

One of the co-founders of GAAD, Joe Devon, articulated a vision in a 2011 article, stating: “The digital world should be open to everyone, including those with disabilities” This article inspired the initiation of the event.

Although Apple provides developers with extensive APIs to support accessibility features in apps, making an app accessible still requires significant manpower, energy, and other resources. From a purely business perspective, the return on investment for most projects is not ideal. For this reason, more companies, developers, and members of society need to fully recognize the importance of accessibility and its social value, rather than assessing its return solely from an economic standpoint.

With the emergence of new devices like Apple Vision Pro and multimodal Large Language Models, the means and prospects for implementing accessibility technologies have significantly expanded and improved.

For most developers, fully implementing accessibility in a project from the outset is undoubtedly a huge challenge. However, by adhering to a vision of accessibility and making gradual improvements, when your project serves a broader user base, you will find that all the efforts are worthwhile.

We should not wait until we face barriers to recognize the importance of accessibility. Let’s take action and, through our efforts, provide convenience and opportunities for everyone.

On this year’s Global Accessibility Awareness Day (GAAD), Apple announced the launch of a series of new accessibility features, further enhancing the inclusivity of its technology. These include new additions for the iPhone and iPad such as Eye Tracking, Music Haptics, and Vocal Shortcuts. Additionally, Apple has introduced innovative functionalities to its visionOS, including Live Captions and Braille Screen Input.

Originals

What Does spacing = nil Mean in SwiftUI?

Fatbobman

In SwiftUI, many layout container constructors include a spacing parameter with a default value of nil, which controls the spacing between adjacent views. This article will start with this default parameter to explore the concept of Spacing in SwiftUI in-depth, and share some related tips and considerations.

Recent Selections

Swift sucks at web serving… or does it?

Wade Tregaskis

In this article, Wade Tregaskis conducts a thorough analysis of Swift’s performance in the web serving domain. Through a set of performance benchmarks, he compares web servers implemented using Swift Vapor, Node.js, PHP FPM + NGINX, and Kotlin Helidon, focusing specifically on metrics such as throughput, latency, RAM usage, and power consumption. Although initial tests showed that the Swift Vapor framework had lower throughput and a higher rate of request failures, subsequent community collaboration and technical optimization significantly improved its performance, particularly in terms of throughput and latency. These findings indicate that despite Swift’s smaller market share in web serving, its performance and potential for optimization are remarkable, making it competitive with other mainstream technologies.

Debugging Animations

objc.io

In SwiftUI, animations are triggered by state changes. The system creates interpolations for the changing components based on the animation functions set by developers. However, developers cannot intervene in the animation process, such as pausing at specific points. In this article (including a video), Chris Eidhof and Florian Kugler explore how to precisely control the animation process using the CustomAnimation feature introduced at WWDC 2023. By integrating this functionality into a view modifier and coupling it with slider input to update the animation, they make the debugging process more intuitive and effective.

@LiveModel in SwiftData

Pat

SwiftData leverages Swift’s modern concurrency model to provide developers with an elegant, secure, and efficient way to handle data. However, many developers have noticed that when data updates occur in a non-main context, even though the data is successfully updated in the background, the changes are not always promptly reflected in the views. To address this issue, Pat has proposed a solution called the @LiveModel property wrapper. This wrapper ensures that data changes made in any context are immediately reflected in the UI, effectively resolving synchronization issues between data and views.

Reducing iOS Test execution time with Selective Testing

Tuan Hoang

In this article, Tuan Hoang (Eric) discusses the importance of automated testing in ensuring project quality and the issues with increased execution time as the number of tests grows. For example, Eric encountered a problem at his previous company where running over 3,000 unit tests required approximately 420 minutes each day. To address this issue, he proposed a “selective testing” strategy. This method involves analyzing the modules affected by code changes and running tests only on those modules, significantly reducing test execution time. Selective testing is implemented through five steps: generating a module dependency graph, computing module hashes, using cached hashes for comparison, updating the test plan, and updating the cache. This approach not only improves testing efficiency but also reduces the burden on continuous integration systems.

Backend APIs: Constant evolution but tethered to the past

Thomas Durand

In modern application development, rapid deployment and continuous iteration are the norm. When mobile apps rely on backend services, the management of backend APIs becomes particularly crucial. In this article, Thomas Durand explores how to ensure backward compatibility of APIs while introducing new features, outlining a series of strategies such as version control and backward-compatible changes to ensure smooth transitions across different versions of applications and minimize user disruption. The article emphasizes that compared to regular application development, API management requires more meticulous planning and enhanced testing, which are critical for maintaining stable operation of the apps and user satisfaction.

The examples and tests mentioned in the article are based on the Vapor framework, demonstrating how to manage the gradual evolution of APIs without sacrificing the functionality of older app versions.

Craftsmanship & Consideration

David Smith

Since 2009, David Smith has attended every WWDC, making it a significant part of his annual work routine. In this article, David shares his anticipation for the upcoming 2024 WWDC and his deep reflections on his years of participation in this event. He emphasizes that his excitement for WWDC stems not just from the event itself, but also from the opportunity to connect with a community that shares a commitment to craftsmanship and thoughtful consideration. David elaborates on the core values of this community—craftsmanship and consideration—and expresses his desire to continuously learn and grow through interactions with such a community.

Weekly Swift & SwiftUI insights, delivered every Monday night. Join developers worldwide.
Easy unsubscribe, zero spam guaranteed