Skip to content

fix: [Accessibility][Tracking] Other Accessibility Issues#82518

Merged
Julesssss merged 12 commits intoExpensify:mainfrom
TaduJR:fix-Accessibility-Tracking-Other-Accessibility-Issues
Feb 23, 2026
Merged

fix: [Accessibility][Tracking] Other Accessibility Issues#82518
Julesssss merged 12 commits intoExpensify:mainfrom
TaduJR:fix-Accessibility-Tracking-Other-Accessibility-Issues

Conversation

@TaduJR
Copy link
Contributor

@TaduJR TaduJR commented Feb 15, 2026

Explanation of Change

This PR fixes 4 accessibility issues from the Accessibility Tracking initiative:

1. #77255 — Error messages not associated with input fields (WCAG 1.3.1)

Screen readers didn't announce form validation errors when inputs received focus because FormHelpMessage had no programmatic link to its input. Fixed by adding aria-describedby/nativeID pairing in BaseTextInput (web) and accessibilityHint (native) so errors are announced in context. Covers 15+ pages automatically since the fix is in the shared BaseTextInput component.

2. #76951 — Subscription plan cards missing list semantics (WCAG 1.3.1)

Subscription plan cards were rendered as plain Views. Added role="list" on the container and role="listitem" with descriptive aria-label + importantForAccessibility="no-hide-descendants" on each card so screen readers announce "list, 2 items" and provide atomic card descriptions.

3. #76914 — Workspaces page missing table semantics (WCAG 1.3.1)

The Workspaces page displays a visual data table but used flat View/Text with no ARIA table roles. Added role="table", role="row", role="columnheader", and role="cell" on the wide layout so screen readers announce proper table structure with cell-by-cell navigation. Narrow/mobile layout retains button semantics since it uses a card-like UI. Added TABLE, ROW, COLUMNHEADER, and CELL to CONST.ROLE.

4. #77573 — No screen reader feedback after requesting new OTP code (WCAG 4.1.3)

When requesting a new magic code, the success message "Code requested. Please check your device." appeared visually but screen readers never announced it. Fixed with two complementary mechanisms:

  • AccessibilityInfo.announceForAccessibility() in a useEffect for reliable iOS/Android announcements
  • Persistent <View accessibilityLiveRegion="polite"> wrapper around the conditional DotIndicatorMessage for Android and web (aria-live)
  • Also fixed requestValidateCodeAction() to reset validateCodeSent: false in optimistic data (matching requestContactMethodValidateCode) so the state transition true → false → true correctly re-triggers the announcement on resend

Fixed Issues

$ #79248
PROPOSAL: #79248 (comment)

Tests

#77255 — Error messages associated with input fields

Web (JAWS/NVDA + Chrome):

  1. Navigate to the Sign In page
  2. Tab to focus the email/phone input and press Enter without entering anything
  3. Verify the error message appears below the input
  4. Tab back to the input field
  5. Verify the screen reader announces the error message together with the field's label (via aria-describedby)

#76951 — Subscription plan cards with list semantics

  1. Sign in and navigate to Settings > Subscription
  2. Using a screen reader (JAWS/NVDA on web), navigate to the "Your Plan" section
  3. Verify the plan cards are announced as a list (e.g., "list, 2 items")
  4. Verify each card is announced as a listitem with a descriptive label (e.g., "Collect Plan, Chat, ...") without reading each child element individually
  5. Verify sighted users see no visual difference

Note: VoiceOver on macOS does not announce the position for the last item in the subscription plan benefits list (e.g., item 8 says "Budgeting" instead of "Budgeting, 8 of 8"). Items 1–7 announce position correctly. This
is a confirmed VoiceOver-only bug Windows Narrator announces all 8 items correctly including "8 of 8".


#76914 — Workspaces page with table semantics

  1. Sign in and ensure at least one workspace exists
  2. Navigate to the Workspaces tab
  3. Using a screen reader (JAWS/NVDA), verify the workspace list is announced as "table" with column count
  4. Verify the header row announces "Workspace name", "Owner", "Workspace type" as column headers
  5. Verify each workspace row announces as a row with cells associated to their column headers
  6. Verify cell-by-cell navigation works (Ctrl+Alt+Arrow keys in JAWS)

#77573 — Screen reader feedback after requesting new OTP code

Native (VoiceOver on iOS / TalkBack on Android):

  1. Navigate to Settings > Profile > Contact methods
  2. Add a new contact method or tap an unverified email
  3. On the magic code screen, wait for the countdown to finish
  4. Swipe to focus the "Didn't receive a magic code?" button and double-tap to activate
  5. Verify the screen reader announces "Code requested. Please check your device." after the code is sent
  6. Wait for the countdown to finish again and repeat step 4
  7. Verify the announcement fires again on subsequent resends (not just the first time)
  • Verify that no errors appear in the JS console

Offline tests

Same as tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."
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
    • MacOS: Desktop
  • 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 there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • 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 a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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
Screen_Recording_20260216_202330_New.Expensify.Dev.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Mac-Chrome.mp4

@TaduJR TaduJR requested review from a team as code owners February 15, 2026 17:29
@melvin-bot
Copy link

melvin-bot bot commented Feb 15, 2026

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@melvin-bot
Copy link

melvin-bot bot commented Feb 15, 2026

@ShridharGoel 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]

@melvin-bot melvin-bot bot removed request for a team February 15, 2026 17:29
@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 87.39% <ø> (ø)
src/components/FormHelpMessage.tsx 80.00% <100.00%> (+6.66%) ⬆️
...nput/BaseTextInput/implementation/index.native.tsx 77.83% <100.00%> (+0.10%) ⬆️
...ionModal/ValidateCodeForm/BaseValidateCodeForm.tsx 84.37% <100.00%> (+1.04%) ⬆️
src/libs/actions/User.ts 23.28% <ø> (ø)
src/pages/workspace/WorkspacesListRow.tsx 98.18% <100.00%> (+0.30%) ⬆️
...cription/SubscriptionPlan/SubscriptionPlanCard.tsx 0.00% <0.00%> (ø)
...nPlan/getSubscriptionPlanBenefitA11yProps/index.ts 0.00% <0.00%> (ø)
...s/TextInput/BaseTextInput/implementation/index.tsx 0.00% <0.00%> (ø)
...etSubscriptionPlanBenefitA11yProps/index.native.ts 0.00% <0.00%> (ø)
... and 1 more
... and 113 files with indirect coverage changes

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb1832fbe3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…ListPage

- Add onKeyDown handler to handle Space key for role="row" rows, since
  RNW PressResponder only allows Space activation for button-like roles
- Extract shouldApplyTableRole variable to condition all table-related
  ARIA roles (table, row, columnheader) consistently
- Pass isTableActive parameter to getWorkspaceMenuItem for conditional
  row vs button role
@TaduJR TaduJR marked this pull request as draft February 15, 2026 20:12
@TaduJR TaduJR marked this pull request as ready for review February 16, 2026 17:26
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7131ab579

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Feb 18, 2026

@TaduJR Unable to go to the domains row, and can't select the complete row of a workspace

Screen.Recording.2026-02-19.at.1.34.56.AM.mov

@ShridharGoel
Copy link
Contributor

#76951 doesn't seem to have been fixed

Screen.Recording.2026-02-19.at.1.32.24.AM.mov

@rushatgabhane
Copy link
Member

@TaduJR can you please prioritize this

heyjennahay
heyjennahay previously approved these changes Feb 20, 2026
Copy link
Contributor

@heyjennahay heyjennahay left a comment

Choose a reason for hiding this comment

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

No concern with product change

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 20, 2026

@TaduJR can you please prioritize this

Sure sure 👍

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 20, 2026

#76951 doesn't seem to have been fixed

@ShridharGoel

As mention on W3 guidelines and the OP they are not navigated using tab since they are not interactive elements, you should use

Use the arrow keys or press the L key to navigate to the visual list in the "Your Plan" section.

For VoiceOver on Mac its equivalent is control + option + arrow key as on the test steps

Mac-Chrome.mp4

can't select the complete row of a workspace

Fixed these to focus on the whole workspace row

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 20, 2026

On each item of the subscription plan details

Oh I see I was focusing on the end list

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Feb 20, 2026

Might be out of scope here: The full text of "Please fix the errors in the form before continuing." is not accessible. Only the link is accessible.

Edit: The parts of the full text get selected on using the arrow keys, but not the whole text at once.

Screen.Recording.2026-02-20.at.11.18.47.PM.mov

@ShridharGoel
Copy link
Contributor

What about the domains row ?

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 20, 2026

What about the domains row ?

The domains row also in not intractable so we don't need to announce like workspace row. We announce Workspace row because it's intractable using enter key then it leads you to workspace setting.

Only the domain enable button should be focused via tabl tho I don't fully agree that the current announcement of the button is correct

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 20, 2026

Might be out of scope here: The full text of "Please fix the errors in the form before continuing." is not accessible. Only the link is accessible.

This is also expected I think as Per W3 guideline since we already announce the error on the input that would violate the guideline if we announce redundantly. On the current video you uploaded you can see the "fix the errors" is only focusable but the whole sentence is not focused

@ShridharGoel
Copy link
Contributor

"fix the errors" is only focusable but the whole sentence is not focused

I thought we would want the whole sentence to be focused. But it's fine if that's not expected.

@ShridharGoel
Copy link
Contributor

@TaduJR What about the "empty group" issue?

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 21, 2026

@ShridharGoel

I thought we would want the whole sentence to be focused. But it's fine if that's not expected.

On Real Device. It works as you expected.

Screen_Recording_20260221_075055_New.Expensify.Dev.mp4

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 21, 2026

@TaduJR What about the "empty group" issue?

Fixed.

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 21, 2026

Also please check this note on the Test Steps

Note: VoiceOver on macOS does not announce the position for the last item in the subscription plan benefits list (e.g., item 8 says "Budgeting" instead of "Budgeting, 8 of 8"). Items 1–7 announce position correctly. This
is a confirmed VoiceOver-only bug Windows Narrator announces all 8 items correctly including "8 of 8".

@melvin-bot melvin-bot bot requested a review from Julesssss February 21, 2026 06:15
Copy link
Contributor

@ShridharGoel ShridharGoel left a comment

Choose a reason for hiding this comment

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

Let's use diff values for web and native using index.ts and index.native.ts instead of the Platform.OS check.

@Julesssss Julesssss merged commit 93b993e into Expensify:main Feb 23, 2026
29 checks passed
@OSBotify
Copy link
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
Copy link
Contributor

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

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #82518.

Android 🤖 iOS 🍎
❌ FAILED ❌ https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-93b993e-921b623-bec08c9c48962cbd510eabbba6231c42abbd7f43/index.html
The QR code can't be generated, because the Android build failed iOS
Web 🕸️
https://82518.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.25-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 cancelled 🔪

@IuliiaHerets
Copy link

Hi @TaduJR. QA failed this PR with one of the original issue

1771923492769.82518.mp4

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.25-13 🚀

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

@TaduJR
Copy link
Contributor Author

TaduJR commented Feb 25, 2026

Hi @TaduJR. QA failed this PR with one of the #77573

Hi @IuliiaHerets

Sorry for the delay. I thought I replied.

The tables are not focusable with Tab that is the expected result. You should use Ctrl + Option + Arrow Keys if you are on Mac, or if you are on windows follow this guide https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1 about navigating on tables section.

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