VoiceOver وتسميات إمكانية الوصول
صِف عناصر التحكم للتقنيات المساعدة
VoiceOver وتسميات إمكانية الوصول درس مجاني في SwiftUI Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في 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/7) وفتح باقي دورة SwiftUI Academy، انتقل إلى CoddyKit PRO. تتضمن دورة SwiftUI Academy 4 دروس في المجموع.
ماذا ستتعلم في «VoiceOver وتسميات إمكانية الوصول»؟
صِف عناصر التحكم للتقنيات المساعدة تتمرن على SwiftUI Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ SwiftUI Academy؟
لا تُشترط خبرة سابقة. SwiftUI Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «VoiceOver وتسميات إمكانية الوصول»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس SwiftUI Academy هذا؟
نعم. كل درس في SwiftUI Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- VoiceOver وتسميات إمكانية الوصول
- النوع الديناميكي والخطوط المتدرجة
- توطين السلاسل وString Catalogs
- التكيف مع الوضع الفاتح والداكن