Accessibility: what does the screen reader say?
Some people hear your app instead of seeing it. Follow VoiceOver or TalkBack through one product screen, swipe by swipe, and hear it go from "button, button" to a screen anyone can use.
What you'll take away
- Explain why an icon-only button says nothing but button to VoiceOver and TalkBack
- Give each element a label, a role and a state, so nothing is said by colour alone
- Turn a − 1 + stepper into one adjustable element, and group a name with its price
- Widen a 24 pt icon to 44 pt with hitSlop, and let buttons grow with text at 200%
The 1-minute version
Tap a point and the picture below plays that step.
Start with nothing on, swipe right all the way, then switch things on one at a time and listen to what changes
A heart button with only an icon, no text: what does a screen reader say?
The picture: the product screen on the phone as its user sees it, with the screen reader's focus box where VoiceOver or TalkBack draws it; at the phone's foot, the screen's reading order as a street, a house per stop a swipe reaches, the screen reader walking it; up the road, the OS's building, whose settings hold the text size. In the tap steps the note zooms in on the heart's touch area. The words are a model in one order (label, state, role); VoiceOver and TalkBack word and order them differently, and differ between versions.
Compare them all: Accessibility on a phone
The same product screen, a screen reader swiping through every tile together. Count the stops, and how many of them say what they do.
Use it when Never: a screen reader user can't use this
Skip it when Icon buttons without a label, anywhere
The spoken words are a model in the order label, state, role; the real words and order differ between VoiceOver and TalkBack and their versions. Press any tile to see it large above, with when it fits.
The props a screen reader reads
| Prop | Says | Example |
|---|---|---|
| accessibilityLabel | what it is | Favourite |
| accessibilityRole | what kind | button, header, adjustable, image |
| accessibilityState | its state now | selected, disabled, checked, expanded |
| accessibilityValue + accessibilityActions | a value to change | quantity 2, increment / decrement |
| accessible | its children as one | a name and its price |
| hitSlop | nothing: it widens the touch area | a 24 pt icon to 44 pt |
Testing it for real
Turn on VoiceOver (iOS) or TalkBack (Android) on a phone and use your screen with your eyes closed for a minute. Xcode's Accessibility Inspector and Google's Accessibility Scanner app list missing labels and small touch targets; set the phone's text size to the largest and look for cut-off words.
In real code
// What a screen reader needs from a product card: a label for every icon, roles and states it can say, one adjustable
// quantity instead of − 1 +, the name and price read together, a 44 pt touch area, and text that may grow.
import { useState } from "react";
import { Image, Pressable, StyleSheet, Text, View } from "react-native";
const SIZES = [{ id: "S", soldOut: false }, { id: "M", soldOut: true }, { id: "L", soldOut: false }];
export function ProductCard({ onAdd }: { onAdd: (qty: number, size: string) => void }) {
const [fav, setFav] = useState(false);
const [qty, setQty] = useState(1);
const [size, setSize] = useState("S");
return (
<View style={styles.card}>
{/* A meaningful image gets a label; a decorative one would get accessible={false}. */}
<Image accessible accessibilityLabel="Blue trail running shoe" accessibilityRole="image" source={{ uri: "https://example.com/shoe.jpg" }} style={styles.photo} />
<View style={styles.row}>
{/* accessible on the container: name and price are one stop, read together. */}
<View accessible style={styles.grow}>
<Text accessibilityRole="header" style={styles.title}>Trail runner</Text>
<Text>฿2,490</Text>
</View>
{/* An icon-only button: the label says what it does, the role says it's a button, the state says it's on. */}
<Pressable
accessibilityLabel="Favourite"
accessibilityRole="button"
accessibilityState={{ selected: fav }}
hitSlop={10} // the 24 pt icon becomes a 44 pt target, nothing moves
onPress={() => setFav((f) => !f)}
>
<Text style={styles.icon}>{fav ? "♥" : "♡"}</Text>
</Pressable>
</View>
<View style={styles.row}>
{SIZES.map((s) => (
<Pressable
key={s.id}
accessibilityLabel={s.soldOut ? `Size ${s.id}, sold out` : `Size ${s.id}`}
accessibilityRole="button"
// Not colour alone: disabled is said ("dimmed" on VoiceOver), and the label says why.
accessibilityState={{ disabled: s.soldOut, selected: size === s.id }}
disabled={s.soldOut}
onPress={() => setSize(s.id)}
style={[styles.chip, s.soldOut && styles.soldOut]}
>
<Text>{s.id}</Text>
</Pressable>
))}
</View>
{/* One adjustable element: swipe up or down to change it, the new value read out. */}
<View
accessible
accessibilityLabel="Quantity"
accessibilityRole="adjustable"
accessibilityValue={{ min: 1, max: 10, now: qty }}
accessibilityActions={[{ name: "increment" }, { name: "decrement" }]}
onAccessibilityAction={(e) => {
if (e.nativeEvent.actionName === "increment") setQty((q) => Math.min(10, q + 1));
if (e.nativeEvent.actionName === "decrement") setQty((q) => Math.max(1, q - 1));
}}
style={styles.row}
>
<Pressable onPress={() => setQty((q) => Math.max(1, q - 1))} style={styles.step}><Text>−</Text></Pressable>
<Text>{qty}</Text>
<Pressable onPress={() => setQty((q) => Math.min(10, q + 1))} style={styles.step}><Text>+</Text></Pressable>
</View>
{/* No fixed height: at 200 % text the button grows instead of cutting its label. */}
<Pressable accessibilityRole="button" onPress={() => onAdd(qty, size)} style={styles.add}>
<Text maxFontSizeMultiplier={2.5} style={styles.addText}>Add to cart</Text>
</Pressable>
</View>
);
}
const styles = StyleSheet.create({
card: { gap: 12, padding: 16 },
photo: { width: "100%", aspectRatio: 1.6, borderRadius: 12 },
row: { flexDirection: "row", alignItems: "center", gap: 8 },
grow: { flex: 1 },
title: { fontSize: 20, fontWeight: "600" },
icon: { fontSize: 24 },
chip: { minWidth: 44, minHeight: 44, alignItems: "center", justifyContent: "center", borderRadius: 8, borderWidth: 1 },
soldOut: { opacity: 0.4 },
step: { minWidth: 44, minHeight: 44, alignItems: "center", justifyContent: "center" },
add: { paddingVertical: 14, borderRadius: 12, alignItems: "center", backgroundColor: "#1d5fae" },
addText: { color: "white", fontWeight: "600" },
});
tsc against each library's own published types (react-native and the libraries this file imports); type-checked only, never run on a phoneIt printed: tsc 6.0.3 (strict): no errors against react-native 0.88.1 (type-checked only)The card the lesson reads: labels on the icon and the image, roles and states (selected, disabled), an adjustable quantity with increment / decrement actions, the name and price grouped, hitSlop to 44 pt, a button that grows with its text. Type-checked with tsc against the types react-native 0.88 publishes; no phone or screen reader ran it.
Common questions
How does a screen reader on a phone work?
VoiceOver on iOS and TalkBack on Android: swipe right for the next element, left to go back, double tap to press. It reads what the app gives it: each element's label, role, state and value.
accessibilityLabel vs accessibilityHint?
The label is its name, short, like Favourite, read every time. The hint explains what pressing it does; it comes after and people can turn hints off. Anything essential belongs in the label.
Why isn't colour enough?
Someone who can't see doesn't know it's red, and some colour-blind people can't tell. A sold-out size needs accessibilityState disabled and a label that says sold out, and on screen a word or an icon too.
How should a − 1 + stepper work with a screen reader?
Make it one element with the adjustable role, an accessibilityValue and increment / decrement actions. People swipe up or down to change it and hear the new value, instead of swiping through three stops.
What does the accessible prop do?
It makes a View and its children one element, read in one go, like a name with its price. Don't group a box with separate buttons inside, and watch for the typo accessibile, which does nothing.
How big should a button be?
Apple asks for a touch area of at least 44 × 44 pt, Material 48 × 48 dp. For a smaller icon add hitSlop, say 10 on every side, so a 24 pt icon takes a full 44 pt of touch.
How do I support large text?
React Native's Text already follows the phone's text size. What you do is not fix the height of buttons or rows, let them grow with their content, and look at your screens at 200 % for cut-off words.
Next lesson
Testing a React Native appLevel: Intermediate
Component tests find a button by its role and the words people see: the same labels and roles you just added.