Made the text content of chat message accessible in iOS#81663
Made the text content of chat message accessible in iOS#81663Uzaifm127 wants to merge 1 commit intoExpensify:mainfrom
Conversation
| @@ -2042,6 +2043,8 @@ function PureReportActionItem({ | |||
| ); | |||
| }; | |||
|
|
|||
There was a problem hiding this comment.
❌ CONSISTENCY-1 (docs)
Platform-specific logic is being added directly within the component body. This creates a hardcoded platform-specific value that increases maintenance overhead and complexity.
Suggested fix: Separate this concern through platform-specific file extensions:
// PureReportActionItem.ios.tsx
const ACCESSIBLE_PROP = false;
// PureReportActionItem.tsx (or .android.tsx, .web.tsx)
const ACCESSIBLE_PROP = true;
// Then in the component:
<PressableWithSecondaryInteraction
accessible={ACCESSIBLE_PROP}
...
/>Alternatively, if this is a fundamental accessibility difference, consider making PressableWithSecondaryInteraction handle this internally with platform-specific files rather than exposing it to every consumer.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d531da1c89
ℹ️ 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".
| preventDefaultContextMenu={draftMessage === undefined && !hasErrors} | ||
| withoutFocusOnSecondaryInteraction | ||
| accessibilityLabel={translate('accessibilityHints.chatMessage')} | ||
| accessible | ||
| accessible={!isIOSNative} |
There was a problem hiding this comment.
Preserve VoiceOver access to message actions on iOS
On iOS native, setting the message container accessible={false} removes the only accessibility node that exposes onPress and onSecondaryInteraction for many report actions (e.g., plain-text messages that only render Text fragments). In that case VoiceOver focus moves to the text nodes, which don't have handlers, so users can no longer activate the message or open the context menu (copy/reply/react) via accessibility. This regression only appears for iOS VoiceOver users and for messages without other interactive children; consider keeping the container accessible or gating it only when a focused child with its own handlers exists.
Useful? React with 👍 / 👎.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fine from a product perspective
Explanation of Change
Made the parent element non-accessible of chat message in iOS
Fixed Issues
$ #80203
PROPOSAL: #80203 (comment)
Tests
Precondition: Enable the VoiceOver on iOS.
Offline tests
Same as Test
QA Steps
Same as Test
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
iOS-native.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari