You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-10-06] [Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page #70473
Version Number: 9.2.13-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@Eskalifer1 Slack conversation (hyperlinked to channel name): #Open source
Action Performed:
Create a workspace
Send Expense
Go to Report page
Hover over the avatars at the header
Create one more expense in this chat
Hover over the avatars at the header
Click on one of the expenses in the list
Hover over the avatars at the header in RHP
Expected Result:
The cursor should be of type pointer, as the avatar can be clicked on
Actual Result:
The cursor is of text type, which leads to poor UX
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
When recording video on a Mac, the cursor never changes, so I couldn't demonstrate this in the recorded video, but I repeated all the steps you need to take in the video and pointed to the avatars with the incorrect cursor.
It turns out that we get a role with the value true passed to the getButtonRole function (parameter isNested), but the component itself does not accept the value isNested, so we end up in if and return the cursor for the text.
What changes do you think we should make in order to solve the problem?
There are several ways to solve this problem depending on what we expect:
If we always want to get the value role="button", we can pass the parameter false:
role={getButtonRole(false)}
Or simply:
role={CONST.ROLE.BUTTON}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
If this needs to be changed globally depending on isNested, then the corresponding change must be made to the getButtonRole function. Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
🚨 Edited by proposal-police: This proposal was edited at 2025-09-12 14:58:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect cursor on hover over avatar on report page
What is the root cause of that problem?
AvatarWithDisplayName uses role={getButtonRole(true)} which returns CONST.ROLE.PRESENTATION
This is semantically correct for nested interactive elements according to accessibility guidelines. The nested buttons should use PRESENTATION role to avoid accessibility tree conflicts
What changes do you think we should make in order to solve the problem?
We should fix the cursor logic to be more intelligent to consider if the element is actually clickable. By using this approach, we can make sure that all places that clickable and have onPress handler will have correct cursor type
// If it has an onPress handler, it should be clickable regardless of role// Optional can check explicit [rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION) && !isNested as well if needed// if (onPress && [rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION) && !isNested) {if(onPress){returnstyles.cursorPointer;}
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-][Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page[/-][+][Due for payment 2025-10-06] [Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page[/+]on Sep 29, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.19-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@rushatgabhane@sonialiap The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Sep 12, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)melvin-bot commentedon Sep 12, 2025
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.m-natarajan commentedon Sep 12, 2025
Proposal by @Eskalifer1
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect cursor on hover over avatar on report page
What is the root cause of that problem?
The reason for this behavior is as follows:
The
HeaderWithBackButtoncomponent has these avatars as part of middleContent:App/src/components/MoneyRequestHeader.tsx
Lines 283 to 285 in 8dbf5be
App/src/components/HeaderWithBackButton/index.tsx
Lines 100 to 108 in 8dbf5be
In turn, the
AvatarWithDisplayNamecomponent renders avatars in this part:App/src/components/AvatarWithDisplayName.tsx
Lines 242 to 248 in 8dbf5be
But in this case, we pass role as
role={getButtonRole(true)}, which returns PRESENTATION in the browser:App/src/components/Button/utils/index.web.ts
Line 4 in 8dbf5be
And the
PressableWithoutFeedbackcomponent gives different styles for the cursor depending on the role:App/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Lines 68 to 79 in 8dbf5be
It turns out that we get a role with the value true passed to the
getButtonRolefunction (parameter isNested), but the component itself does not accept the value isNested, so we end up in if and return the cursor for the text.What changes do you think we should make in order to solve the problem?
There are several ways to solve this problem depending on what we expect:
Pass the isNested prop to this component:
App/src/components/AvatarWithDisplayName.tsx
Lines 242 to 246 in 8dbf5be
If we always want to get the value
role="button", we can pass the parameter false:Or simply:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
If this needs to be changed globally depending on isNested, then the corresponding change must be made to the getButtonRole function.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
lorretheboy commentedon Sep 12, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-12 14:58:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect cursor on hover over avatar on report page
What is the root cause of that problem?
AvatarWithDisplayName uses role={getButtonRole(true)} which returns CONST.ROLE.PRESENTATION
This is semantically correct for nested interactive elements according to accessibility guidelines. The nested buttons should use PRESENTATION role to avoid accessibility tree conflicts
App/src/components/AvatarWithDisplayName.tsx
Lines 249 to 252 in 803250d
What changes do you think we should make in order to solve the problem?
We should fix the cursor logic to be more intelligent to consider if the element is actually clickable. By using this approach, we can make sure that all places that clickable and have onPress handler will have correct cursor type
Add this below here
App/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Lines 69 to 80 in 413fee6
Remove default definition here
App/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Line 17 in 413fee6
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
We can add
App/src/components/AvatarWithDisplayName.tsx
Lines 249 to 252 in 803250d
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
rushatgabhane commentedon Sep 13, 2025
@lorretheboy's proposal LGTM 🎀 👀 🎀
#70473 (comment)
melvin-bot commentedon Sep 13, 2025
Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
rushatgabhane commentedon Sep 13, 2025
@lorretheboy one of my concern is that should every component that has a onPress function be of style pointer?
I'm sure there must be exceptions
27 remaining items
[-][Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page[/-][+][Due for payment 2025-10-06] [Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page[/+]melvin-bot commentedon Sep 29, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.19-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-10-06. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Sep 29, 2025
@rushatgabhane @sonialiap The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
show normal cursor for read-only pressable
rushatgabhane commentedon Oct 1, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: cbb18ae#r166920795
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not critical
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:https://github.com/Expensify/Expensify/issues/554451
Regression Test Proposal
Precondition:
Test:
Web and desktop only
Do we agree 👍 or 👎
sonialiap commentedon Oct 6, 2025
Payment summary:
@rushatgabhane $125 please request in NewDot
@lorretheboy $125 offer sent in upwork
lorretheboy commentedon Oct 7, 2025
Hi @sonialiap, I have accepted the offer. Thanks
sonialiap commentedon Oct 7, 2025
Thanks! Paid