All jobs

Add Accessibility Labels to an Expo App's Screens and Components

Yes. An agent finds every pressable icon, image and field in your Expo app a screen reader cannot name, labels them through your i18n files, and opens a PR.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent starts by reading the component library, because in an Expo app built on infinitered/ignite every screen is assembled from app/components. It finds the pattern the project already follows: Button.tsx sets accessibilityRole="button" on its Pressable, Card.tsx sets the role only when onPress makes it pressable, and the Toggle folder gives Radio, Checkbox and Switch their roles. It then finds where the pattern stops. Icon.tsx exports PressableIcon, a TouchableOpacity around an Image, with no role and no label of its own; Header.tsx renders its left and right actions through that same PressableIcon or a bare TouchableOpacity, so a back arrow or a menu icon in the header is announced as nothing; ListItem.tsx becomes a TouchableOpacity whenever it has a press handler but never says it is a button; and TextField.tsx wraps the input in a TouchableOpacity that carries accessibilityState for disabled and nothing else.

Then it reads the screens. LoginScreen.tsx builds a PasswordRightAccessory from PressableIcon that flips between the view and hidden icons to show or hide the password, with no label, so the one control a user must find to check what they typed is silent. WelcomeScreen.tsx renders the logo and the welcome-face image through plain Image with no accessibilityLabel and no accessible={false}, so a reader is left guessing whether they matter. The counter-example is DemoPodcastListScreen.tsx, which already does this properly: it passes accessibilityLabel and accessibilityHint from translate("demoPodcastListScreen:accessibility.cardHint") and its siblings, with the strings under an accessibility block in app/i18n/en.ts. That is the house style, and the agent extends it rather than inventing another.

The changes are small and typed. PressableIcon gets accessibilityRole="button" by default, an accessibilityLabel prop that Header.tsx fills from a new leftAccessibilityLabelTx and rightAccessibilityLabelTx pair (falling back to the visible leftTx or rightTx text when there is one), and ListItem sets the button role whenever it is touchable. TextField passes the resolved label text to the TextInput as accessibilityLabel, so a field announced by its placeholder today is announced by its label. The password accessory on the login screen gets a label that changes with the state, loginScreen:accessibility.showPassword and hidePassword, and the welcome images get accessible={false} for the decorative face and a label for the logo. Every new string goes under an accessibility key in en.ts and into ar.ts, es.ts, fr.ts, hi.ts, ja.ts and ko.ts too, because test/i18n.test.ts greps every tx and translate call in app/ and fails on any key missing from en, and the other locale files mirror its shape.

The proof is the test run. The agent adds component tests beside the existing Text.test.tsx, using @testing-library/react-native as that file does: getByRole("button", { name }) for a header action and a touchable ListItem, getByLabelText for the password toggle in both states and for the email field, and a check that the decorative image is hidden from the tree. It runs pnpm install in the boilerplate, pnpm compile for the tsc --noEmit pass, pnpm lint:check and pnpm test, which runs the i18n key test along with the new ones under jest-expo, and pastes the summary into the pull request.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Add accessibility labels and roles across this Expo app. Read every file under app/components, app/screens and app/i18n first, plus test/i18n.test.ts and jest.config.js, and note which components already set accessibilityRole and how DemoPodcastListScreen passes translated accessibilityLabel and accessibilityHint strings. Give PressableIcon a default button role and a label prop, let Header pass labels to its icon actions and fall back to the visible action text, make ListItem a button whenever it is touchable, pass TextField's resolved label to its TextInput as accessibilityLabel, label the password show and hide toggle on the login screen with state-dependent strings, and mark the decorative welcome image as not accessible while labelling the logo. Put every new string under an accessibility key in en.ts and mirror it in every other locale file. Add component tests with @testing-library/react-native that find these controls by role and label, run compile, lint:check and the full jest suite including the i18n key test, and open a pull request with the test summary.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is a pull request on its own branch that touches Icon.tsx, Header.tsx, ListItem.tsx and TextField.tsx in app/components, LoginScreen.tsx and WelcomeScreen.tsx in app/screens, every locale file under app/i18n, and a handful of new *.test.tsx files next to the components they cover. No new dependency is added; @testing-library/react-native and jest-expo are already in devDependencies.

The description lists each control by file with the label or role it gained and the i18n key behind it, quotes the jest summary with the i18n key test and the new component tests named, and shows the tsc and eslint output clean. The transcript at GET /o/{org}/sessions/{id}/messages keeps every command and its output.

Before merging, a reviewer reads the English strings for tone, since they are what VoiceOver and TalkBack will say, and checks the translations in the other locale files, which the agent writes in the same register as the existing ones and marks for a native speaker in the description. A follow-up message to the same session can extend the pass to the demo screens or add a Maestro flow that drives the app through its labels.

Run it on every terminal hand-off

A developer handed an accessibility review before a store submission starts this from the terminal with this body and the app's repository in resources, then goes back to the release branch. The run reads the real components and the real locale files, so the labels follow the app's own i18n layout and the i18n test keeps passing.

Send a request_id, a UUID, with the body so a retried start returns the run it already began. When the turn ends, GET /o/{org}/sessions/{id} names the pull request, and a follow-up to the same session can ask for the demo screens or for hints on the remaining fields.

The use case this job follows, with its automation and trigger: Hand off a long task.

Why run it on Rush?

Accessibility labels are easy to add and tedious to find: the gaps are spread across a component library, the screens that compose it and seven locale files that must stay in step with each other. An agent reads all of it in one pass, follows the convention the podcast screen already set, and proves nothing broke by running the same jest-expo suite the project runs, including the test that greps for missing keys.

Doing it on Rush gives the job its own sandbox with the app's Node version and package manager, keeps every tsc, eslint and jest run in the transcript, and ends in a pull request whose tests find each control by role and label, which is the same way assistive technology will find them.

Frequently asked questions

Will it change what sighted users see?

No. accessibilityLabel, accessibilityRole, accessibilityHint and accessible change only what the accessibility tree reports. The pull request adds no visible text and no styling, and the component tests render the same trees as before.

Why do the strings go through i18n instead of plain props?

Because the app already translates everything through tx props and translate(), with seven locale files, and test/i18n.test.ts fails on any key used in app/ that en.ts lacks. Labels in plain English would be the only untranslated text in the app and would be wrong for a user running it in Arabic or Japanese.

What does it do with the header icons that have no text?

Header gets leftAccessibilityLabelTx and rightAccessibilityLabelTx props and passes them to PressableIcon. When a header uses leftTx or rightTx text instead of an icon, that visible text is the label and nothing new is needed. Screens that call useHeader with a bare leftIcon: "back" get a common:accessibility.back label by default.

Does it cover the demo screens too?

The pull request covers the components and the welcome and login screens, so every app generated from the boilerplate benefits. The demo screens are marked with @demo remove comments and are usually deleted on project creation, so they are left for a follow-up message if the team keeps them.

More Expo jobs

The same job on other stacks

More jobs like this: Hand off a long task

Keep reading