Get started
Introduction
Installation
Your first app
Tutorials
Fission tutorials
Make a Fission Android app accessible with TalkBack
Core concepts
Components
State and effects
Protected routes
Server-side rendering
Styling
Testing
Deployment
Reference
API reference
Cookbook
Fission 0.16.0
Documentation version
Read the changelog →

Make a Fission Android app accessible with TalkBack

Build a labelled pickup form with validation and review state. Trace its semantics and identify the partial Android bridge that still limits TalkBack qualification.
Android

What you will build

Author meaningful form and review semantics, then distinguish those working shared contracts from the unfinished native Android accessibility bridge.
Use FormControl to keep label, help text, required state and validation together
Preserve entered pickup details when moving between edit and review
Keep disabled controls and named review state meaningful without colour alone
Identify the native bridge gap rather than claim a complete TalkBack flow from shared semantics
A visible label is useful, but accessibility also depends on the relationship between that label and the control, the control's current state and what happens after an action. A red border alone does not tell someone which input needs attention. A button called “Save” is also misleading if it only toggles a Boolean and saves nothing.
Here, we prepare pickup details for a local review. The form has a required name, an explicit validation message and, in the second step, optional instructions and an assistance choice. It uses the built-in controls which already own those roles and interactions instead of building lookalike controls from generic boxes.
The Android shell uses AccessKit's Android adapter, but Fission's native TalkBack support is currently incomplete. This page improves authored semantics and supplies a concrete check sequence; it cannot promise a complete TalkBack experience until the native bridge supports and passes that flow.
Start from a new project (optional)

Create the Android project

Complete Android SDK/NDK setup, then start an emulator or connect a phone.
cargo install cargo-fission
fission init android-make-a-fission-android-app-accessible-with-talkback
cd android-make-a-fission-android-app-accessible-with-talkback
fission add-target android --project-dir .
cargo add serde_yaml
Keep the generated src/main.rs. Both native and Web entrypoints below launch this form rather than leaving the starter counter installed on Android.

Run the finished example

fission run --target android --project-dir .

1. Give the control a label and the error a relationship

FormControl supplies the name, helper, required flag and error context to its descendant input. That is different from placing an unrelated text label above a bare field. Keep one authority for those messages: the input does not declare a second label or a conflicting error.
The visible and semantic error comes from the same validation result. Preparing an empty name leaves the form editable; preparing a valid name makes it read-only for review. Nothing is persisted or submitted, so the result says exactly that.
{"id":"fission-tabs-1","tabs":[{"index":0,"label":"src/app.rs","value":"src-app-rs"},{"index":1,"label":"src/translations.rs","value":"src-translations-rs"},{"index":2,"label":"i18n/en-US.yaml","value":"i18n-en-us-yaml"},{"index":3,"label":"i18n/es-ES.yaml","value":"i18n-es-es-yaml"},{"index":4,"label":"src/lib.rs","value":"src-lib-rs"},{"index":5,"label":"preview/lib.rs","value":"preview-lib-rs"}]}
{"id":"fission-tabs-1","index":0,"label":"src/app.rs","value":"src-app-rs"}
use fission::prelude::*;

fission_component! {
    pub PickupDetails<()> {
        state {
            name: String = String::new(),
            attempted: bool = false,
            reviewing: bool = false,
        }
    }
    view(draft, _state, cx) {
        let tokens = &cx.view.env().theme.tokens;
        let invalid_name = draft.attempted && draft.name.trim().chars().count() < 2;
    } =>
    SafeArea(
        child: Scroll(
            child: Container(
                child: SemanticsRegion(
                    identifier: Some("pickup-details".to_string()),
                    label: Some(cx.tr("pickup.title")),
                    child: Column(gap: tokens.spacing.m, children: [
                        Text(cx.tr("pickup.title")).size(tokens.typography.heading2_size),
                        Text(cx.tr("pickup.context")),
                        FormControl(
                            label: Some(cx.tr("pickup.name")),
                            helper: Some(cx.tr("pickup.name_help")),
                            error: if invalid_name {
                                Some(cx.tr("pickup.invalid_name"))
                            } else { None },
                            required: true,
                            child: TextInput(
                                read_only: draft.reviewing,
                                bind: draft.name,
                                semantics_identifier: "pickup.name".to_string(),
                            ),
                        ),
                        Button(
                            child: Text(cx.tr("pickup.prepare")),
                            key: "prepare-pickup",
                            disabled: draft.reviewing,
                            on_press: reduce {
                                draft.attempted = true;
                                if draft.name.trim().chars().count() >= 2 {
                                    draft.reviewing = true;
                                }
                            },
                        ).semantics_identifier("pickup.prepare"),
                        if draft.reviewing {
                            Column(gap: tokens.spacing.s, children: [
                                SemanticsRegion(
                                    identifier: Some("pickup.review-status".to_string()),
                                    label: Some(cx.tr("pickup.status_label")),
                                    value: Some(cx.tr("pickup.prepared")),
                                    child: Text(cx.tr("pickup.prepared")),
                                ),
                                Button(
                                    child: Text(cx.tr("pickup.edit")),
                                    key: "edit-pickup",
                                    on_press: reduce { draft.reviewing = false; },
                                ).semantics_identifier("pickup.edit"),
                            ])
                        },
                    ]),
                ),
            ).padding_all(tokens.spacing.l),
        ),
    )
}
{"id":"fission-tabs-1","index":1,"label":"src/translations.rs","value":"src-translations-rs"}
use std::collections::HashMap;
use fission::prelude::*;

pub fn create_env() -> Env {
    let mut env = Env::default();
    env.locale = Locale::from("en-US");
    for (locale, source) in [
        ("en-US", include_str!("../i18n/en-US.yaml")),
        ("es-ES", include_str!("../i18n/es-ES.yaml")),
    ] {
        let messages: HashMap<String, String> =
            serde_yaml::from_str(source).expect("valid checked-in translations");
        env.i18n.add_bundle(TranslationBundle { locale: Locale::from(locale), messages });
    }
    env
}
{"id":"fission-tabs-1","index":2,"label":"i18n/en-US.yaml","value":"i18n-en-us-yaml"}
pickup.title: "Prepare pickup details"
pickup.context: "Prepare a local pickup note for review. Nothing is booked, saved or sent by this example."
pickup.name: "Name for pickup"
pickup.name_help: "Use the name the pickup team should ask for."
pickup.invalid_name: "Enter a pickup name of at least 2 characters."
pickup.instructions: "Pickup instructions"
pickup.instructions_help: "Optional. Add only the access details needed for this pickup; avoid sensitive health information."
pickup.assistance: "I would like assistance at pickup."
pickup.prepare: "Prepare details for review"
pickup.status_label: "Pickup review status"
pickup.prepared: "Details are ready for your review. They have not been submitted."
pickup.edit: "Edit pickup details"
{"id":"fission-tabs-1","index":3,"label":"i18n/es-ES.yaml","value":"i18n-es-es-yaml"}
pickup.title: "Preparar los datos de recogida"
pickup.context: "Prepara una nota local para revisarla. Este ejemplo no reserva, guarda ni envía nada."
pickup.name: "Nombre para la recogida"
pickup.name_help: "Usa el nombre por el que debe preguntar el equipo."
pickup.invalid_name: "Escribe un nombre para la recogida de al menos 2 caracteres."
pickup.instructions: "Instrucciones de recogida"
pickup.instructions_help: "Opcional. Añade solo los detalles de acceso necesarios; evita información médica sensible."
pickup.assistance: "Me gustaría recibir ayuda en la recogida."
pickup.prepare: "Preparar los datos para revisarlos"
pickup.status_label: "Estado de la revisión"
pickup.prepared: "Los datos están listos para que los revises. No se han enviado."
pickup.edit: "Editar los datos de recogida"
{"id":"fission-tabs-1","index":4,"label":"src/lib.rs","value":"src-lib-rs"}
pub mod app;
mod translations;

use app::PickupDetails;
use fission::prelude::*;

#[cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))]
pub fn run_desktop() -> anyhow::Result<()> {
    DesktopApp::<(), _>::new(PickupDetails::new())
        .with_env(translations::create_env())
        .run()
}
#[cfg(any(target_os = "android", target_os = "ios"))]
fn mobile_app() -> MobileApp<(), PickupDetails> {
    let app = MobileApp::<(), _>::new(PickupDetails::new())
        .with_env(translations::create_env());
    #[cfg(all(target_os = "android", debug_assertions))]
    let app = app.with_test_control_port(48761);
    app
}
#[cfg(any(target_os = "android", target_os = "ios"))]
pub fn run_mobile() -> anyhow::Result<()> { mobile_app().run() }

#[cfg(target_os = "android")]
#[no_mangle]
fn android_main(app_handle: AndroidApp) {
    let _ = mobile_app().run_with_android_app(app_handle);
}
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen::prelude::wasm_bindgen(start)]
pub fn run_web() -> Result<(), wasm_bindgen::JsValue> {
    console_error_panic_hook::set_once();
    WebApp::<(), _>::new(PickupDetails::new())
        .with_env(translations::create_env())
        .run()
        .map_err(|error| wasm_bindgen::JsValue::from_str(&error.to_string()))
}
{"id":"fission-tabs-1","index":5,"label":"preview/lib.rs","value":"preview-lib-rs"}
mod app;
mod translations;

use fission::prelude::*;
use wasm_bindgen::prelude::*;

#[wasm_bindgen(start)]
pub fn run() -> Result<(), JsValue> {
    console_error_panic_hook::set_once();
    WebApp::<(), _>::new(app::PickupDetails::new())
        .with_env(translations::create_env())
        .mount("#fission-web-mount")
        .run()
        .map_err(|error| JsValue::from_str(&error.to_string()))
}
{"id":"fission-tabs-1"}
Prepare an empty form and check the visible validation message. Enter a name, prepare again and confirm the input is read-only, the Prepare action is disabled and Edit remains available. Edit must return to the same draft rather than clear it.
The semantic identifiers are stable automation targets, not spoken labels. A name such as pickup.name helps LiveTest locate the field; it is not a substitute for the translated label a person hears.
Show the app preview
Hide the app preview

2. Expose choice, disabled state and review status

The assistance choice is a real Checkbox, not a coloured circle with a click handler. It supplies checked and disabled state through Fission's normal semantics. The optional instructions remain a labelled multiline input.
The declared order is also the task order: name, instructions, assistance, prepare and review. Do not visually move controls into a different order and then expect an accessibility adapter to infer the intended sequence.
{"id":"fission-tabs-1","tabs":[{"index":0,"label":"src/app.rs","value":"src-app-rs"}]}
{"id":"fission-tabs-1","index":0,"label":"src/app.rs","value":"src-app-rs"}
use fission::prelude::*;

fission_component! {
    pub PickupDetails<()> {
        state {
            name: String = String::new(),
            attempted: bool = false,
            reviewing: bool = false,
            instructions: String = String::new(),
            assistance: bool = false,
        }
    }
    view(draft, _state, cx) {
        let tokens = &cx.view.env().theme.tokens;
        let invalid_name = draft.attempted && draft.name.trim().chars().count() < 2;
    } =>
    SafeArea(
        child: Scroll(
            child: Container(
                child: SemanticsRegion(
                    identifier: Some("pickup-details".to_string()),
                    label: Some(cx.tr("pickup.title")),
                    child: Column(gap: tokens.spacing.m, children: [
                        Text(cx.tr("pickup.title")).size(tokens.typography.heading2_size),
                        Text(cx.tr("pickup.context")),
                        FormControl(
                            label: Some(cx.tr("pickup.name")),
                            helper: Some(cx.tr("pickup.name_help")),
                            error: if invalid_name {
                                Some(cx.tr("pickup.invalid_name"))
                            } else { None },
                            required: true,
                            child: TextInput(
                                read_only: draft.reviewing,
                                bind: draft.name,
                                semantics_identifier: "pickup.name".to_string(),
                            ),
                        ),
                        TextInput(
                            label: Some(cx.tr("pickup.instructions").into()),
                            helper_text: Some(cx.tr("pickup.instructions_help").into()),
                            multiline: true,
                            read_only: draft.reviewing,
                            bind: draft.instructions,
                            semantics_identifier: "pickup.instructions".to_string(),
                        ),
                        Checkbox(
                            label: Some(cx.tr("pickup.assistance")),
                            checked: draft.assistance,
                            disabled: draft.reviewing,
                            bind(on_toggle): to(draft.assistance),
                            semantics_identifier: "pickup.assistance".to_string(),
                        ),
                        Button(
                            child: Text(cx.tr("pickup.prepare")),
                            key: "prepare-pickup",
                            disabled: draft.reviewing,
                            on_press: reduce {
                                draft.attempted = true;
                                if draft.name.trim().chars().count() >= 2 {
                                    draft.reviewing = true;
                                }
                            },
                        ).semantics_identifier("pickup.prepare"),
                        if draft.reviewing {
                            Column(gap: tokens.spacing.s, children: [
                                SemanticsRegion(
                                    identifier: Some("pickup.review-status".to_string()),
                                    label: Some(cx.tr("pickup.status_label")),
                                    value: Some(cx.tr("pickup.prepared")),
                                    child: Text(cx.tr("pickup.prepared")),
                                ),
                                Button(
                                    child: Text(cx.tr("pickup.edit")),
                                    key: "edit-pickup",
                                    on_press: reduce { draft.reviewing = false; },
                                ).semantics_identifier("pickup.edit"),
                            ])
                        },
                    ]),
                ),
            ).padding_all(tokens.spacing.l),
        ),
    )
}
{"id":"fission-tabs-1"}
Enter a name and instructions, select assistance and prepare the details. The checkbox should retain its checked state whilst becoming disabled for review; Edit should restore interaction without changing the values.
The status region carries a label and value for inspection. This example does not claim that changing generic text automatically causes a live announcement. Confirm what the actual native screen reader exposes rather than treating a visible status as proof.
Show the app preview
Hide the app preview

3. Inspect semantics, then test the actual TalkBack path

fission doctor android --project-dir .
fission run --target android --project-dir .
fission test --target android --project-dir .
fission build --target android --project-dir . --release
Use LiveTest to inspect the named region, input, checkbox and actions. Check that roles, labels, checked state, read-only state and validation messages agree with the visible screen. That catches authored errors; it does not qualify the Android bridge.
On a phone with TalkBack enabled, navigate without looking at the screen. Find the name field, submit the invalid form, correct it, enter instructions, select assistance, prepare and return to editing. Listen for each purpose, value and state, and record any control that cannot be reached or activated. Include the largest usable text size and long Spanish labels; the scroll view must keep the next action reachable.
Native touch and focus also need direct checks. Keep the standard button and checkbox target policies and test the actual hit areas rather than shrinking them to fit a screenshot.
The accessibility reference records the current Android bridge gap. A Web canvas preview does not expose a complete browser document accessibility tree either, so it cannot substitute for the TalkBack check. If a required native action fails, the accessibility goal remains blocked even when the authored semantics are correct.
The form now has meaningful labels, associated errors, real checked/disabled state and honest review copy. Completion of the full Android screen-reader goal still requires a working native bridge and a qualified TalkBack interaction sequence.

Current references