---
title: "Recipe: announce a result to a screen reader"
description: "A screen reader reads a result from a live region: a text with role=\"status\" or role=\"alert\" that stays mounted while its words change."
modificationDate: "2026-11-24"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe: announce a result to a screen reader

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/announce: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

There is no announce call (React Native's `AccessibilityInfo.announceForAccessibility`).
Put the words in a `text` that is a live region and change them: a screen reader reads a
`role="status"` politely, after what it is saying, and a `role="alert"` at once where the
platform allows. Keep the `text` mounted, empty until there is something to say: text it
already had is not read again, and one that arrives holding its text is not read on every
host.

```prompt Use this recipe in my app
Make the Exact app in this folder do what this recipe describes. Use https://github.com/expo/exact/blob/main/docs/recipes/announce.md as the source for each step. The Exact checkout has the same page at docs/recipes/announce.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. Read the recipe. If it leaves a choice that I did not make (which screen, which data, which platforms), propose one and ask me before you write code.
3. Do what the recipe says, in its order, with its tags, properties, functions and grants. Its component, state and URL names are examples. Change nothing else in the app.
4. Add a test in app.test.contract for each thing a person does that you changed. Copy the recipe's `contract-test` block where it has one. A drive operation the recipe shows (`call`, a ticket answer such as `tap @N accepted`) is not a test step: run it with `bun exact.mjs agent`.
5. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 6) and report it; do not keep trying.
6. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
7. Tell me what you changed, what the tests and checks reported, and what I must still do by hand.
```

```contract
component App
  state picked = 0
  state problem = ""
  action pick
    picked = picked + 1
  action save
    problem = picked > 2 ? "Pick at most two." : ""
  view
    column padding=16 gap=8
      button press=pick testId="pick"
        text "Pick one"
      button press=save testId="save"
        text "Save"
      text (picked == 0 ? "" : `${picked} selected`) role="status" testId="picked"
      text problem role="alert" testId="problem"
```

```contract-test
test "the counts and the error are the regions' text"
  tap "pick"
  expect text "picked" == "1 selected"
  tap "pick"
  tap "pick"
  tap "save"
  expect text "problem" == "Pick at most two."
```

- `aria-live="polite"` or `"assertive"` makes a `text` a live region without the role, and
  wins over the role's; `aria-live="off"` silences a `status`.
- Put the role on the `text` that changes. An `aria-label` on that text supplies the
  words its accessible name reports. Windows and Wayland also apply a live container's
  priority to its accessible children. A child with an explicit `aria-live` sets the
  priority for its subtree, including `off` for silence.
- iOS, iPadOS, tvOS and macOS post the platform's announcement, the web leaves it to the
  browser, and Android and Windows mark a live region for TalkBack and Narrator. On a
  Wayland desktop, Orca reads the announced text. See the [details for each host](https://exact.expo.dev/learn/contract-for-agents/views-layout-and-interaction.md#announcing-a-change).
