Skip to content

fix: name the account button, chat senders and feature switches correctly - #107951

Merged
mountiny merged 9 commits into
Expensify:mainfrom
callstack-internal:fix/a11y-wrong-target-labels
Dec 1, 2026
Merged

mountiny merged 9 commits into
Expensify:mainfrom
callstack-internal:fix/a11y-wrong-target-labels

Conversation

@BartekObudzinski

@BartekObudzinski BartekObudzinski commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Four accessibility labels named the wrong thing.

  • The account button read "Account." because a template string appended a period. It now uses getTabAccessibilityLabel like the other tabs and reads "Account".
  • Message senders were read by their login, for example "concierge@expensify.com". The label now uses the display name of the person in the avatar, who is the copilot when a copilot acted. Messages credited to a workspace read the workspace name instead of its policy ID.
  • More features switches were named after their description ("Track and organize spend."). They now start with the feature name, "Categories, Track and organize spend.", like the other toggle rows in the app. As on those rows, the description is also read on its own.
  • The avatar at the top of a new chat read "Details". It now says whose details it opens, for example "Concierge details", through a new accessibilityHints.chatDetails key, and falls back to "Details" when the chat has no name. Only en.ts has the key, so the translation workflow needs to run on this PR to add it to the other locales.

Fixed Issues

$ #108003
PROPOSAL:

Tests

  1. Turn on VoiceOver or TalkBack.
  2. On the Inbox tab, move to the account avatar in the header. Verify it is read as "Account", with no trailing period.
  3. Open the Concierge chat and tap "View chat history" if it is collapsed. Move to the large avatar at the top. Verify it is read as "Concierge details", not "Details".
  4. In the same chat, move to the avatar next to a Concierge message (on Android it is its own element). Verify it is read as "Concierge", not "concierge@expensify.com".
  5. Open Workspaces > a workspace > More features. Verify each switch is read with the feature name first, for example "Categories, Track and organize spend.", and toggling still works.
  • Verify that no errors appear in the JS console

Offline tests

Same as tests. The labels come from data already on the device.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native

Accessibility tree from agent-device snapshot on iOS 27.2:

Control Before After
Account button [button] "Account." [button] "Account"
Concierge chat avatar [button] "Details" [button] "Concierge details"
More features switch [switch] "Track and organize spend." [switch] "Categories, Track and organize spend."

On iOS the message sender avatar is merged into the message row, so the sender label change shows on Android.

iOS: mWeb Safari
MacOS: Chrome / Safari

🤖 Generated with Claude Code

@expensify-chore-bot

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@mountiny
mountiny marked this pull request as ready for review November 25, 2026 18:08
@mountiny
mountiny requested review from a team as code owners November 25, 2026 18:08
@expensify-chore-bot
expensify-chore-bot Bot requested review from gijoe0295 and removed request for a team November 25, 2026 18:08
@expensify-chore-bot

Copy link
Copy Markdown

@gijoe0295 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@expensify-chore-bot
expensify-chore-bot Bot requested review from trjExpensify and removed request for a team November 25, 2026 18:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T18:25:05.559074Z ce6ae1d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

trjExpensify
trjExpensify previously approved these changes Nov 25, 2026

@trjExpensify trjExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@BartekObudzinski

Copy link
Copy Markdown
Contributor Author

@mountiny I need to run parrot here. It only change en.ts strings used as screen reader labels, so no visible UI copy changes

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 10c9d5ae..d342b233 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -11940,6 +11940,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
         selectAllMembers: 'Alle Mitglieder auswählen',
         selectAllValues: 'Alle Werte auswählen',
         selectAllRules: 'Alle Regeln auswählen',
+        chatDetails: (chatName: string) => `${chatName}-Details`,
     },
     parentReportAction: {
         deletedReport: 'Gelöschter Bericht',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 4cbd2706..dacf222a 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -12135,6 +12135,7 @@ ${reportName}`,
         selectAllMembers: 'Επιλέξτε όλα τα μέλη',
         selectAllValues: 'Επιλέξτε όλες τις τιμές',
         selectAllRules: 'Επιλέξτε όλους τους κανόνες',
+        chatDetails: (chatName: string) => `Λεπτομέρειες ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Διαγραμμένη αναφορά',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 8750e6e3..2040ade1 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -12281,6 +12281,7 @@ ${reportName}`,
         selectAllMembers: 'Seleccionar todos los miembros',
         selectAllValues: 'Seleccionar todos los valores',
         selectAllRules: 'Seleccionar todas las reglas',
+        chatDetails: (chatName: string) => `Detalles de ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Informe eliminado',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 523ef3d9..f3eafe9c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -11970,6 +11970,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
         selectAllMembers: 'Sélectionner tous les membres',
         selectAllValues: 'Sélectionner toutes les valeurs',
         selectAllRules: 'Sélectionner toutes les règles',
+        chatDetails: (chatName: string) => `Détails de ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Note de frais supprimée',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 3baef0d3..2527b068 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -11886,6 +11886,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
         selectAllMembers: 'Seleziona tutti i membri',
         selectAllValues: 'Seleziona tutti i valori',
         selectAllRules: 'Seleziona tutte le regole',
+        chatDetails: (chatName: string) => `Dettagli ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Report eliminato',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 74c1221c..04afeb64 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -11692,6 +11692,7 @@ ${reportName}`,
         selectAllMembers: 'すべてのメンバーを選択',
         selectAllValues: 'すべての値を選択',
         selectAllRules: 'すべてのルールを選択',
+        chatDetails: (chatName: string) => `${chatName}の詳細`,
     },
     parentReportAction: {
         deletedReport: '削除されたレポート',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index da41f59e..d438b28b 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -11855,6 +11855,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
         selectAllMembers: 'Alle leden selecteren',
         selectAllValues: 'Selecteer alle waarden',
         selectAllRules: 'Selecteer alle regels',
+        chatDetails: (chatName: string) => `Details van ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Verwijderd rapport',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 01eceffe..5f2c2726 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -11904,6 +11904,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
         selectAllMembers: 'Zaznacz wszystkich członków',
         selectAllValues: 'Zaznacz wszystkie wartości',
         selectAllRules: 'Zaznacz wszystkie reguły',
+        chatDetails: (chatName: string) => `Szczegóły: ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Usunięty raport',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 908742d4..3f792ba5 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -11864,6 +11864,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
         selectAllMembers: 'Selecionar todos os membros',
         selectAllValues: 'Selecionar todos os valores',
         selectAllRules: 'Selecionar todas as regras',
+        chatDetails: (chatName: string) => `Detalhes de ${chatName}`,
     },
     parentReportAction: {
         deletedReport: 'Relatório excluído',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 251125b2..3403f693 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -11393,6 +11393,7 @@ ${reportName}`,
         selectAllMembers: '全选所有成员',
         selectAllValues: '选择所有值',
         selectAllRules: '选择所有规则',
+        chatDetails: (chatName: string) => `${chatName} 详情`,
     },
     parentReportAction: {
         deletedReport: '已删除的报告',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

titleStyle={styles.textStrong}
subtitle={subtitle}
switchAccessibilityLabel={subtitle}
switchAccessibilityLabel={title}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR, we'd have only 2 stops: title → switch that read Categories → Track and organize spend., Button, Toggle, Track and organize spend.

Now we have 3 stops: title → description → switch that read Categories → Track and organize spend. → Categories, Track and organize spend., 1, Button, Toggle, Categories, Track and organize spend.. So both the title and description are announced twice.

I don't know which one is better. I remember in the past we have some attemps to fix bugs regarding labels being announced twice in title & switch.

cc @trjExpensify or anyone with accessibility exp here.

Before:

Untitled.mov

After:

Untitled2.mov

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The switch now says what it turns on, the same as the other toggle rows in the app, which also read title and description again on the switch. Removing that repetition means changing the shared ToggleSettingsOptionRow, which touches over a hundred rows, so I'd keep it out of this PR. Happy to follow up separately if trjExpensify wants that.

isWorkspaceActor,
shouldDisplayAllActors: displayAllActors,
actorHint: String(isWorkspaceActor && !!resolvedPrimaryAvatar.id ? resolvedPrimaryAvatar.id : login || defaultDisplayName).replaceAll(CONST.REGEX.MERGED_ACCOUNT_PREFIX, ''),
actorHint: isWorkspaceActor && resolvedPrimaryAvatar.name ? resolvedPrimaryAvatar.name : personActorHint,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gap: When a report preview has several senders, the heading shows "Alice & Bob" (here). But actorHint (or personActionHint) is only one person. So screen readers say "Alice" while the screen shows "Alice & Bob".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find. The heading buttons now read both names when the preview shows two senders.

@gijoe0295

gijoe0295 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Screen.Recording.2026-11-30.at.21.33.13.mov
Android: mWeb Chrome
iOS: HybridApp Screenshot 2026-11-30 at 21 25 43 Screenshot 2026-11-30 at 21 24 44 Screenshot 2026-11-30 at 21 24 19 Screenshot 2026-11-30 at 21 23 37
iOS: mWeb Safari Screenshot 2026-11-30 at 21 30 05 Screenshot 2026-11-30 at 21 29 43 Screenshot 2026-11-30 at 21 29 22 Screenshot 2026-11-30 at 21 29 09
MacOS: Chrome / Safari
Screen.Recording.2026-11-30.at.21.27.01.mov

@gijoe0295 gijoe0295 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@melvin-bot
melvin-bot Bot requested a review from mountiny November 30, 2026 14:31
@mountiny

mountiny commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Conflicts

@BartekObudzinski

Copy link
Copy Markdown
Contributor Author

@mountiny Conflicts resolved.

@mountiny mountiny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@mountiny
mountiny merged commit 12953c8 into Expensify:main Dec 1, 2026
45 of 46 checks passed
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@kavimuru

kavimuru commented Dec 1, 2026

Copy link
Copy Markdown

@BartekObudzinski @mountiny This PR seems to a11Y testing which is OOO, could this be verified internally?

@OSBotify

OSBotify commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.57-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — this PR corrects screen-reader labels for existing controls without changing workflows or making any existing article sentence incorrect.


view run

@mountiny

mountiny commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

@kavimuru can you just let them know to test it once they are back? Or can some other testers do this? I don't think this is anything complicated to set up, is it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants