Sub topic 3
Trying Your Flutter App with TalkBack and VoiceOver
Assume you know basic Dart, Flutter layouts, and how to run an app on an emulator or device. This chapter shows how to test the accessibility information that Flutter sends to platform screen readers. A screen reader reads visible and interactive content aloud and lets users operate the app without seeing the screen.
What you are testing
Flutter builds a semantics tree from widgets such as Text, Button, TextField, and Image. Android and iOS translate that tree into information that TalkBack and VoiceOver can read.
Test more than whether text is announced. Check that users can discover controls, understand their purpose, operate them, and follow the page in a sensible order.
Test with TalkBack on Android
Use a physical device or an Android emulator.
- Open Settings > Accessibility > TalkBack and turn TalkBack on.
- Open your Flutter app.
- Swipe right to move to the next semantics node. Swipe left to move to the previous node.
- Double-tap anywhere to activate the focused control.
- Explore the screen by touch. Move one finger across the display to hear each item under it.
- Check headings, buttons, form fields, images, error messages, and selected states.
TalkBack usually announces a control's role, label, state, and available action. For example, a favorite control should sound like “Add to favorites, button,” not just “heart.”
Test with VoiceOver on iOS
On an iPhone or iPad, open Settings > Accessibility > VoiceOver and turn VoiceOver on.
Swipe right or left with one finger to move between elements. Double-tap to activate the focused element. Drag one finger around the display to explore items by touch. Use the rotor to inspect headings, links, or other categories when your app supports them.
Check whether the focus moves in a logical order. A screen reader user should hear the page title before its controls and should encounter a form label before its input.
| Check | Expected result |
|---|---|
| Interactive control | It has a useful label and announces its role |
| Image | Its purpose is described, or it is ignored when decorative |
| Form field | Its label, value, and error state are understandable |
| Focus order | Items follow the visual and task order |
A practical testing loop
Test each important task from start to finish:
- Start with the screen reader already enabled.
- Navigate without looking at the screen.
- Complete an action, such as signing in or adding an item.
- Confirm that status changes and errors are announced.
- Repeat the task with the other platform's screen reader.
For a quick diagnostic, enable Flutter's semantics debugging tools in your development workflow and compare the announced order with the visual order. Then fix the widget semantics rather than adding duplicated visible text.
Exercise
A favorite icon is announced only as “button.” What should you investigate first?
Show answer
Check whether the control has a meaningful label, such as an IconButton tooltip or a Semantics label. Then verify with TalkBack and VoiceOver that the label also describes the current favorite state.