Accesibilidad e interfaz edge-to-edge
Admita TalkBack, fuentes grandes e insets.
Accesibilidad e interfaz edge-to-edge es una lección gratuita de Jetpack Compose Academy en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Jetpack Compose Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Jetpack Compose Academy incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
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.
Preguntas frecuentes
¿La lección «Accesibilidad e interfaz edge-to-edge» es gratis?
Sí — el texto completo de «Accesibilidad e interfaz edge-to-edge» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Jetpack Compose Academy, actualiza a CoddyKit PRO. El curso de Jetpack Compose Academy incluye 4 lecciones en total.
¿Qué aprenderé en «Accesibilidad e interfaz edge-to-edge»?
Admita TalkBack, fuentes grandes e insets. Practicas Jetpack Compose Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Jetpack Compose Academy?
No se requiere experiencia previa. Jetpack Compose Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.
¿Cuánto tiempo toma la lección «Accesibilidad e interfaz edge-to-edge»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Jetpack Compose Academy?
Sí. Cada lección de Jetpack Compose Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Accesibilidad e interfaz edge-to-edge
- Baseline Profiles para un inicio rápido
- App Bundle de lanzamiento firmado
- Arquitectura preparada para Compose Multiplatform