0Pricing
SwiftUI Academy · レッスン

VoiceOverとアクセシビリティラベル

支援技術向けにコントロールを説明します。

「VoiceOverとアクセシビリティラベル」はCoddyKit上の無料SwiftUI Academyレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはSwiftUI Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 SwiftUI Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

What Is VoiceOver?

VoiceOver is Apple's screen reader. It speaks your interface aloud so people who can't see the screen can still use your app. 🔊

SwiftUI Helps You

The good news: SwiftUI auto-generates accessibility for standard views. A Text already reads its content, so you start ahead.

When Labels Go Missing

An icon-only button has no readable text, so VoiceOver may say nothing useful. That's when you add an explicit accessibility label.

Button(action: save) {
    Image(systemName: "square.and.arrow.down")
}

Adding a Label

Attach accessibilityLabel to describe what a control does in plain words, not how it looks.

Button(action: save) {
    Image(systemName: "square.and.arrow.down")
}
.accessibilityLabel("Save")

Label, Not Appearance

Write the label as the user's goal. Say Save, not "down arrow icon". The label is meaning, never decoration.

Adding Hints

An accessibilityHint tells the user what happens after they act. It is read after the label, with a short pause.

.accessibilityLabel("Save")
.accessibilityHint("Saves your note to the list")

Reading the Value

For controls that hold data, accessibilityValue announces the current state, like a slider reading "70 percent".

Slider(value: $level)
    .accessibilityValue("\(Int(level)) percent")

Grouping Elements

Use accessibilityElement(children:) to merge a card's pieces into one swipe, so VoiceOver reads it as a single unit.

VStack { Text(name); Text(role) }
.accessibilityElement(children: .combine)

Marking Roles with Traits

Add accessibilityAddTraits so VoiceOver announces a view's role, like calling a tappable card a button.

.accessibilityAddTraits(.isButton)

Hiding Decoration

Purely decorative images add noise. Use accessibilityHidden(true) to skip them so VoiceOver focuses on what matters.

Image("sparkle")
    .accessibilityHidden(true)

Test It Yourself

Turn on VoiceOver in the Accessibility settings and swipe through your app. Hearing it is the fastest way to spot gaps.

Quick Check

You have an icon-only button. Which modifier gives VoiceOver a readable name?

Recap

You learned to make controls speak: add an accessibilityLabel for icons, hints for outcomes, and group or hide views so VoiceOver flows clearly. ✨

よくある質問

「VoiceOverとアクセシビリティラベル」レッスンは無料ですか?

はい。「VoiceOverとアクセシビリティラベル」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、SwiftUI Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 SwiftUI Academyコースには全4レッスンが含まれています。

「VoiceOverとアクセシビリティラベル」で何を学びますか?

支援技術向けにコントロールを説明します。 ブラウザで直接実行するハンズオンコードでSwiftUI Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

SwiftUI Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのSwiftUI Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。

「VoiceOverとアクセシビリティラベル」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このSwiftUI Academyレッスンでコードを書いて実行できますか?

はい。すべてのSwiftUI Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. VoiceOverとアクセシビリティラベル
  2. Dynamic Typeとスケーラブルフォント
  3. 文字列とString Catalogをローカライズする
  4. ライトモードとダークモードに対応する
← SwiftUI Academyに戻る