Accessibility and Safe Area
Screen reader semantics, safe areas for notches, and inclusive touch/typography defaults.
Busca en todas las páginas de la documentación
Screen reader semantics, safe areas for notches, and inclusive touch/typography defaults.
Provide a spoken name when visible text is missing or incomplete (icon-only controls).
<Pressable accessibilityLabel="Close dialog" onPress={onClose}>
<Icon name="x" />
</Pressable>Tell assistive tech what the control is: button, link, header, image, checkbox, and more.
<Text accessibilityRole="header" style={styles.h1}>
Settings
</Text>Expose selected, disabled, busy, checked, and expanded state to the OS.
<Pressable
accessibilityRole="button"
accessibilityState={{ disabled: loading, busy: loading }}
onPress={onSave}
>
<Text>Save</Text>
</Pressable>Optional extra guidance for what happens after activation - keep it short.
<Pressable
accessibilityLabel="Delete message"
accessibilityHint="Removes this message from your inbox"
onPress={onDelete}
>
<Text>Delete</Text>
</Pressable>Set accessible on a parent to merge children into one focusable unit for card-like rows.
<View accessible accessibilityLabel={`${title}, ${subtitle}`}>
<Text>{title}</Text>
<Text>{subtitle}</Text>
</View>Hide decorative views from the accessibility tree on Android (no-hide-descendants).
<Image
source={bg}
importantForAccessibility="no"
accessibilityElementsHidden
style={StyleSheet.absoluteFill}
/>Wrap the app once (Expo Router templates already do) so inset hooks work.
import { SafeAreaProvider } from "react-native-safe-area-context";
export default function Root() {
return (
<SafeAreaProvider>
<App />
</SafeAreaProvider>
);
}Read pixel insets and apply padding manually when you need full control.
import { useSafeAreaInsets } from "react-native-safe-area-context";
const insets = useSafeAreaInsets();
return <View style={{ paddingTop: insets.top, flex: 1 }}>{children}</View>;Only apply safe padding on selected edges so bottom tabs are not double-padded.
import { SafeAreaView } from "react-native-safe-area-context";
<SafeAreaView style={{ flex: 1 }} edges={["top", "left", "right"]}>
{children}
</SafeAreaView>Aim for about 44x44 pt minimum hit areas. Expand with hitSlop when visuals are smaller.
<Pressable
hitSlop={8}
style={{ minWidth: 44, minHeight: 44, alignItems: "center", justifyContent: "center" }}
onPress={onPress}
>
<Icon name="heart" />
</Pressable>Skip non-essential motion when the user enables reduce motion.
import { AccessibilityInfo } from "react-native";
const reduce = await AccessibilityInfo.isReduceMotionEnabled();
const duration = reduce ? 0 : 250;React to accessibility bold text preferences when fine-tuning typography (iOS primarily).
const bold = await AccessibilityInfo.isBoldTextEnabled();
const weight = bold ? "700" : "400";Move accessibility focus after important UI changes (use sparingly).
import { findNodeHandle, AccessibilityInfo } from "react-native";
const tag = findNodeHandle(ref.current);
if (tag) AccessibilityInfo.setAccessibilityFocus(tag);Prefer high-contrast pairs for body text - especially on image overlays with scrims.
const styles = {
overlayText: { color: "#fff", textShadowColor: "rgba(0,0,0,0.5)", textShadowRadius: 4 },
};System font scaling is on by default - prefer keeping it. Cap pathological sizes with maxFontSizeMultiplier on critical labels only.
<Text maxFontSizeMultiplier={1.4} style={styles.title}>
Balance
</Text>Stack versions: React 19.2.3 · React Native 0.86.0 · Expo SDK 57 · react-native-safe-area-context
Revisado por Chris St. John·Última actualización: 18 jul 2026