إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة
ادعم TalkBack والخطوط الكبيرة والهوامش الداخلية
إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة درس مجاني في Jetpack Compose Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Jetpack Compose Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Jetpack Compose Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Polish Before You Ship
A great app is for everyone. Before release, you make it usable with screen readers, large fonts, and modern full-screen layouts.
What TalkBack Needs
Android has a screen reader called TalkBack. It speaks the UI aloud, so every meaningful element must carry a clear label it can announce.
contentDescription for Icons
Icons and images show no text, so TalkBack reads their contentDescription. Give each one a short, meaningful phrase that says what it does.
Icon(
Icons.Default.Share,
contentDescription = "Share post"
)Hide Decoration from Readers
Purely decorative images add noise when spoken. Set contentDescription to null so TalkBack skips them and focuses on what matters.
Image(
painter = bg,
contentDescription = null
)Respect Larger Fonts
Users can scale system text up. Size text in sp, not fixed dp, so your labels grow with the accessibility settings instead of clipping.
Text("Welcome", fontSize = 16.sp)Touch Targets Stay Tappable
Small buttons are hard to hit. Aim for a 48dp minimum touch target so every control is comfortable for fingers and assistive switches.
Modifier.size(48.dp)Going Edge-to-Edge
Modern apps draw behind the status and navigation bars. Call enableEdgeToEdge in your Activity to let content fill the entire screen.
enableEdgeToEdge()
setContent { App() }Avoid Hiding Behind System Bars
Once edge-to-edge, content can slip under system bars. WindowInsets tell you exactly how much space those bars occupy so you can pad around them.
Quick Check
You add a share icon button. What lets TalkBack announce its purpose?
Apply Insets the Easy Way
The simplest fix is a safeDrawing inset modifier. It pads your content away from the cutouts and bars without any manual math.
Modifier.windowInsetsPadding(
WindowInsets.safeDrawing
)Test Accessibility Early
Turn on TalkBack and the Accessibility Scanner on a device. They surface missing labels and low contrast before a reviewer or user finds them.
Group Related Content
Scattered labels are tiring to hear. Use mergeDescendants in semantics so a card reads as one unit, giving TalkBack users a smoother pass.
Modifier.semantics(
mergeDescendants = true
) {}Recap: Accessible and Immersive
You labeled icons, scaled text in sp, kept targets at 48dp, and went edge-to-edge with insets. Now your app welcomes every user.
الأسئلة الشائعة
هل درس «إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة» مجاني؟
نعم — نص درس «إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Jetpack Compose Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Jetpack Compose Academy 4 دروس في المجموع.
ماذا ستتعلم في «إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة»؟
ادعم TalkBack والخطوط الكبيرة والهوامش الداخلية تتمرن على Jetpack Compose Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Jetpack Compose Academy؟
لا تُشترط خبرة سابقة. Jetpack Compose Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Jetpack Compose Academy هذا؟
نعم. كل درس في Jetpack Compose Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- إمكانية الوصول وواجهة تمتد من الحافة إلى الحافة
- ملفات التعريف الأساسية لبدء تشغيل سريع
- حزمة تطبيق إصدار موقَّعة
- بنية جاهزة لـ Compose Multiplatform