Skip to content

[Due for payment 2025-10-06] [Due for payment 2025-10-01] [$125] Incorrect cursor on hover over avatar on report page #70473

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

  1. Create a workspace
  2. Send Expense
  3. Go to Report page
  4. Hover over the avatars at the header
  5. Create one more expense in this chat
  6. Hover over the avatars at the header
  7. Click on one of the expenses in the list
  8. 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.

2025-09-01.17.21.23.mov

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @sonialiap

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 12, 2025
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 12, 2025
  3. melvin-bot commented on Sep 12, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

  4. melvin-bot commented on Sep 12, 2025

    @melvin-bot

    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.

  5. m-natarajan commented on Sep 12, 2025

    @m-natarajan
    Author

    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 HeaderWithBackButton component has these avatars as part of middleContent:

    <HeaderWithBackButton
    shouldShowBorderBottom={false}
    shouldShowReportAvatarWithDisplay

    if (shouldShowReportAvatarWithDisplay) {
    return (
    <AvatarWithDisplayName
    report={report}
    shouldEnableDetailPageNavigation={shouldEnableDetailPageNavigation}
    openParentReportInCurrentTab={openParentReportInCurrentTab}
    />
    );
    }

    In turn, the AvatarWithDisplayName component renders avatars in this part:

    <PressableWithoutFeedback
    onPress={showActorDetails}
    accessibilityLabel={title}
    role={getButtonRole(true)}
    >
    {multipleAvatars}
    </PressableWithoutFeedback>

    But in this case, we pass role as role={getButtonRole(true)}, which returns PRESENTATION in the browser:

    const getButtonRole: GetButtonRole = (isNested) => (isNested ? CONST.ROLE.PRESENTATION : CONST.ROLE.BUTTON);

    And the PressableWithoutFeedback component gives different styles for the cursor depending on the role:

    const cursorStyle = useMemo(() => {
    if (!interactive) {
    return styles.cursorDefault;
    }
    if (shouldUseDisabledCursor) {
    return styles.cursorDisabled;
    }
    if ([rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION) && !isNested) {
    return styles.cursorText;
    }
    return styles.cursorPointer;
    }, [interactive, shouldUseDisabledCursor, rest.accessibilityRole, rest.role, isNested, styles.cursorPointer, styles.cursorDefault, styles.cursorDisabled, styles.cursorText]);

    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:

    1. Pass the isNested prop to this component:

      <PressableWithoutFeedback
      onPress={showActorDetails}
      accessibilityLabel={title}
      role={getButtonRole(true)}
      >

    2. 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.

  6. lorretheboy commented on Sep 12, 2025

    @lorretheboy
    Contributor

    🚨 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

    <PressableWithoutFeedback
    onPress={showActorDetails}
    accessibilityLabel={title}
    role={getButtonRole(true)}

    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

            // 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) {
                return styles.cursorPointer;
            }

    const cursorStyle = useMemo(() => {
    if (!interactive) {
    return styles.cursorDefault;
    }
    if (shouldUseDisabledCursor) {
    return styles.cursorDisabled;
    }
    if ([rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION) && !isNested) {
    return styles.cursorText;
    }
    return styles.cursorPointer;
    }, [interactive, shouldUseDisabledCursor, rest.accessibilityRole, rest.role, isNested, styles.cursorPointer, styles.cursorDefault, styles.cursorDisabled, styles.cursorText]);

    Remove default definition here

    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

    cursor="pointer" 

    <PressableWithoutFeedback
    onPress={showActorDetails}
    accessibilityLabel={title}
    role={getButtonRole(true)}

    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.

  7. rushatgabhane commented on Sep 13, 2025

    @rushatgabhane
    Member

    @lorretheboy's proposal LGTM 🎀 👀 🎀

    #70473 (comment)

  8. melvin-bot commented on Sep 13, 2025

    @melvin-bot

    Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  9. rushatgabhane commented on Sep 13, 2025

    @rushatgabhane
    Member

    @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

  10. 27 remaining items

  11. 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
  12. melvin-bot commented on Sep 29, 2025

    @melvin-bot

    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:

  13. melvin-bot commented on Sep 29, 2025

    @melvin-bot

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

  14. rushatgabhane commented on Oct 1, 2025

    @rushatgabhane
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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

    1. Create a workspace
    2. Send Expense
    3. Go to Report page
    4. Hover over the avatars at the header - Verify that the cursor is pointer
    5. Create one more expense in this chat
    6. Hover over the avatars at the header - Verify that the cursor is pointer
    7. Click on one of the expenses in the list
    8. Hover over the avatars at the header in RHP - Verify that the cursor is pointer

    Do we agree 👍 or 👎

  15. sonialiap commented on Oct 6, 2025

    @sonialiap
    Contributor

    Payment summary:
    @rushatgabhane $125 please request in NewDot
    @lorretheboy $125 offer sent in upwork

  16. lorretheboy commented on Oct 7, 2025

    @lorretheboy
    Contributor

    Hi @sonialiap, I have accepted the offer. Thanks

  17. sonialiap commented on Oct 7, 2025

    @sonialiap
    Contributor

    Thanks! Paid

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions