Skip to content

[Due for payment 2026-03-31] [A11y] Screen Reader: Many Pages: The control opens another page/URL but announces with a button role #76938

Closed

Description

@nbhardwaj-del

Action Performed:

Prerequisite:

  • the user is logged in.
  1. Using JAWS + Chrome, open the page https://new.expensify.com/settings/profile
  2. Navigate using TAB to the Expensify logo, at the top, left corner of the page
  3. Observe how it is announced

Other Occurrences:

  1. On Workspaces: the row of the workspace

Expected Result:

The Expensify logo logo will be announced as a link, as it takes the user to a new page

Actual Result:

When users navigate to the Expensify logo at the top, left corner of the screen, it is announced as a 'Button'. Users will become confused if they are unexpectedly taken to a different page

HTML:
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" id="expensify-app-icon_svg__Layer_1" x="0" y="0" viewBox="0 0 48 48" width="100%" height="100%" hovered="false" pressed="false" style="height: 40px; width: 40px; border-radius: 40px; background-color: rgb(230, 225, 218);"><style>.expensify-app-icon_svg__st1{fill:#002e22}</style>

Area issue was found in:

Settings–Profile

Failed WCAG checkpoints

WCAG 4.1.2 Name, Role, Value
https://www.w3.org/WAI/WCAG22/Understanding/name-role-value

User impact:

Providing role, state, and value information on all user interface components enables compatibility with assistive technology, such as screen readers, screen magnifiers, and speech recognition software, used by people with disabilities.

Suggested resolution:

Implement the control as a native element with a valid href attribute if it opens another page or URL,
https://www.magentaa11y.com/#/web-criteria/component/link?tab=2
https://a11y-101.com/design/button-vs-link

Environment(s)

Windows Windows 10 - Chrome

Screenshots/Videos

Image
Bug6994132_1762283091039.Expensify_logo_link_announces_as_button.mp4

Version Number: NA
Reproducible in staging?: NA
Reproducible in production?: Yes
Email or phone of affected tester (no customers): NA
Logs: https://stackoverflow.com/c/expensify/questions/4856 NA
Notes/Photos/Videos: Any additional supporting documentation Yes
Expensify/Expensify Issue URL: https://platform.applause.com/company/12102/products/36605/community-issues/6994132
Issue reported by: NA
Slack conversation: NA

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    Weekly
    Accessibility
    on Dec 7, 2025
  2. added and removed
    Weekly
    on Jan 1, 2026
  3. melvin-bot commented on Jan 1, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  4. added
    Melvin Triage
    on Feb 18, 2026
  5. MelvinBot commented on Feb 18, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Screen readers (e.g., JAWS) announce the Expensify logo in the top-left corner as a "Button", but pressing it navigates the user to a different page (Inbox/Chats). The same issue exists for workspace rows on the Workspaces page — they announce as "Button" but navigate to a workspace page. Per WCAG 4.1.2, elements that navigate should have link semantics so users know to expect page navigation rather than an in-place action.

    What is the root cause of that problem?

    Two components use CONST.ROLE.BUTTON on their Pressable elements despite performing navigation:

    1. Expensify logo in src/components/Navigation/NavigationTabBar/index.tsx:304 uses accessibilityRole={CONST.ROLE.BUTTON} but its onPress calls navigateToChats, which navigates to ROUTES.INBOX (or a specific report route).

    2. Workspace rows in src/pages/workspace/WorkspacesListRow.tsx:228 use role={CONST.ROLE.BUTTON} but onPress triggers navigateToWorkspace, which navigates to ROUTES.WORKSPACE_INITIAL or ROUTES.WORKSPACE_OVERVIEW.

    Both render as role="button" in the DOM, causing screen readers to announce them as buttons instead of links.

    What changes do you think we should make in order to solve the problem?

    Change the role from CONST.ROLE.BUTTON to CONST.ROLE.LINK on both components:

    1. In src/components/Navigation/NavigationTabBar/index.tsx:304 — change accessibilityRole={CONST.ROLE.BUTTON} to role={CONST.ROLE.LINK} (this also migrates from the deprecated accessibilityRole prop to the modern role prop, consistent with the rest of the NavigationTabBar items).

    2. In src/pages/workspace/WorkspacesListRow.tsx:228 — change role={CONST.ROLE.BUTTON} to role={CONST.ROLE.LINK}.

    This is a well-supported pattern in the codebase — CONST.ROLE.LINK is documented as "Use for elements that navigate to other pages or content" (src/CONST/index.ts:5671), and BaseGenericPressable already has built-in W3C APG Link Pattern keyboard handling for role="link" (src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx:152-172). There are ~16 existing usages of role={CONST.ROLE.LINK} across the codebase.

    What alternative solutions did you explore? (Optional)

    • Using a native <a> element with href was considered, but the navigation is done programmatically via Navigation.navigate() with complex conditional logic (e.g., restoring last viewed report on wide layout). A Pressable with role={CONST.ROLE.LINK} achieves the correct screen reader semantics while preserving the existing navigation logic.
    Detailed Investigation

    Root Cause Analysis

    The Expensify logo button is rendered at src/components/Navigation/NavigationTabBar/index.tsx:303-316 (only on wide/desktop layout):

    <PressableWithFeedback
        accessibilityRole={CONST.ROLE.BUTTON}  // <-- produces role="button" in DOM
        accessibilityLabel={translate('common.home')}
        accessible
        testID="ExpensifyLogoButton"
        onPress={navigateToChats}  // <-- navigates to Inbox page
        ...
    >

    The workspace rows are rendered at src/pages/workspace/WorkspacesListRow.tsx:225-232:

    <PressableWithoutFeedback
        accessible
        accessibilityLabel={accessibilityLabel}
        role={CONST.ROLE.BUTTON}  // <-- produces role="button" in DOM
        onPress={onPress}  // <-- navigates to workspace page
        ...
    >

    The navigateToChats function (line 185-210) calls Navigation.navigate(ROUTES.INBOX) or navigates to a specific report. The navigateToWorkspace function (in WorkspacesListPage.tsx:515-525) calls Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID)) or ROUTES.WORKSPACE_OVERVIEW.getRoute(policyID).

    Evidence Chain

    1. CONST.ROLE.BUTTON = 'button' (src/CONST/index.ts:5660) → renders role="button" in DOM
    2. Screen reader encounters <button role="button" aria-label="Home"> → announces "Home, Button"
    3. User expects an in-place action (button behavior) but gets navigation (link behavior)
    4. WCAG 4.1.2 violation: role does not match behavior

    Relevant Code

    • src/components/Navigation/NavigationTabBar/index.tsx:303-316 — Expensify logo with wrong role
    • src/pages/workspace/WorkspacesListRow.tsx:225-232 — Workspace row with wrong role
    • src/CONST/index.ts:5671-5672 — CONST.ROLE.LINK definition
    • src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx:152-172 — Existing link role keyboard handling

    Implementation Notes

    • The accessibilityRole prop on the logo button should be migrated to role (per the CONST.ROLE JSDoc which states new components should use role instead)
    • Changing from CONST.ROLE.BUTTON to CONST.ROLE.LINK will also remove data-selection-scraper-hidden-element and userSelectNone style from these elements (controlled by isRoleButton in BaseGenericPressable:51), which is the correct behavior for link-like elements
    • The Enter key activation for link elements is already handled by BaseGenericPressable

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  6. added
    External
    Bug
    on Feb 18, 2026
  7. added
    Help Wanted
    on Feb 18, 2026
  8. 40 remaining items

  9. jjcoffee commented on Mar 25, 2026

    @jjcoffee
    Contributor

    BugZero Checklist:

    • [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: N/A - accessibility improvement

    • [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: N/A

    • [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/619556

    Regression Test Proposal

    Precondition:

    • Enable the device's screen reader

    Test:

    1. Go to Settings->Profile on a wide screen layout
    2. Using a screen reader, TAB/navigate to the Expensify logo at the top-left corner
    3. Verify it is announced as a link (not a button)
    4. Press Enter on the logo and verify it still navigates to the Inbox/Chats page
    5. Navigate to the Workspaces page
    6. TAB to a workspace row
    7. Verify it is announced as a link (not a button)
    8. Press Enter on the workspace row and verify it still navigates to the workspace page

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-6bcb-ae5b-1585-7a58f38ac6e4
  10. jjcoffee commented on Mar 25, 2026

    @jjcoffee
    Contributor

    Regression fix deployed to production yesterday, so payment should be due 2026-03-31

  11. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @jjcoffee Huh... This is 4 days overdue. Who can take care of this?

  12. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @jjcoffee Eep! 4 days overdue now. Issues have feelings too...

  13. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @jjcoffee Eep! 4 days overdue now. Issues have feelings too...

  14. changed the title [-]Screen Reader: Many Pages: The control opens another page/URL but announces with a button role[/-] [+][Due for payment 2026-03-31] Screen Reader: Many Pages: The control opens another page/URL but announces with a button role[/+] on Mar 31, 2026
  15. mollfpr commented on Mar 31, 2026

    @mollfpr
    Contributor

    Updated the title to reflect the due date.

  16. melvin-bot commented on Mar 31, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. melvin-bot commented on Apr 1, 2026

    @melvin-bot

    @mallenexpensify Still overdue 6 days?! Let's take care of this!

  18. mallenexpensify commented on Apr 1, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @jjcoffee due $125 via NewDot, due to regression.

    ^ Test case created

    Comment/reopen, if needed. Thx

  19. changed the title [-][Due for payment 2026-03-31] Screen Reader: Many Pages: The control opens another page/URL but announces with a button role[/-] [+][Due for payment 2026-03-31] [A11y] Screen Reader: Many Pages: The control opens another page/URL but announces with a button role[/+] on Apr 2, 2026
  20. JmillsExpensify commented on Apr 6, 2026

    @JmillsExpensify
    Contributor

    $125 approved for @jjcoffee

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

Metadata

Metadata

Labels

AccessibilityAwaiting PaymentBugDailyExternalMelvin Triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions