Skip to content

[$250] mweb - Blue outline appears on Concierge button and app back button #83313

Closed

Description

@jponikarchuk

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.3.25-4
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82518
Email or phone of affected tester (no customers): osidjosdjosdjnodsjni@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Samsung Galaxy S25 FE / Android 16
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com on mweb.
  2. Refresh the page.
  3. Open any chat.

Expected Result:

In Step 2, after refreshing the page, no blue outline will appear on any button.
In Step 3, after opening chat, no blue outline will appear on any button.

Actual Result:

In Step 2, after refreshing the page, blue outline appears on Concierge button.
In Step 3, after opening chat, blue outline appears on back button.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @rojiphil
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026251252315025549
  • Upwork Job ID: 2026251252315025549
  • Last Price Increase: 2026-02-24

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 24, 2026
  2. melvin-bot commented on Feb 24, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #82518

  3. melvin-bot commented on Feb 24, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Feb 24, 2026

    @melvin-bot

    Triggered auto assignment to @kadiealexander (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. github-actions commented on Feb 24, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Feb 24, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #82518 - "fix: [Accessibility][Tracking] Other Accessibility Issues" by @TaduJR (High confidence)
    Related Issues: Part of #79248 (Accessibility Tracking initiative)

    Recommendation: REVERT

    PR #82518 added ARIA roles (role="row", role="cell", role="table", etc.) to improve accessibility and screen reader support. While this is a valid accessibility improvement, it introduced an unintended side effect: browsers now apply default focus styles (blue outlines) to elements with these semantic roles. On mobile web, where keyboard navigation is not typical, these outlines appear unexpectedly after page refresh or navigation.

    The PR should be reverted to unblock the deploy, and a fixed version should be prepared that includes proper CSS to suppress unwanted focus outlines on mobile web while maintaining the accessibility improvements.

    Labels: No changes needed. DeployBlockerCash is correctly applied (App deploy is blocked by this frontend bug). The issue is reproducible on staging but not production, confirming it was introduced in the current staging deploy.

    📋 Detailed Analysis

    Evidence

    • PR fix: [Accessibility][Tracking] Other Accessibility Issues #82518 was merged on 2026-02-23 at 20:36:39Z and is included in the staging deploy checklist (Deploy Checklist: New Expensify 2026-02-23 #83247)
    • The issue is reproducible on staging but not production, matching the PR merge timeline
    • The PR description explicitly states it adds ARIA table roles: "Added role=\"table\", role=\"row\", role=\"columnheader\", and role=\"cell\""
    • The issue affects mobile web Chrome (Android: mWeb Chrome), where the PR changes would apply
    • The PR was identified by melvin-bot as the causing PR in issue comments

    Verification

    PR #82518 modified these key files that could affect button focus styling:

    1. src/pages/workspace/WorkspacesListPage.tsx - Changed PressableWithoutFeedback role from BUTTON to conditional ROW role on wider screens
    2. src/pages/workspace/WorkspacesListRow.tsx - Added role="cell" to multiple View components
    3. src/components/TextInput/BaseTextInput/implementation/index.tsx - Added aria-describedby attribute linking inputs to error messages
    4. src/components/FormHelpMessage.tsx - Added nativeID prop for ARIA associations

    The PR diff shows this critical change in WorkspacesListPage.tsx:

    <PressableWithoutFeedback
    -    role={CONST.ROLE.BUTTON}
    +    role={isLessThanMediumScreen ? CONST.ROLE.BUTTON : CONST.ROLE.ROW}

    While the reported symptoms mention "Concierge button" and "back button," the underlying cause is the same: the PR added semantic ARIA roles throughout the application, which trigger browser default focus styles.

    Root Cause

    When ARIA semantic roles (row, cell, etc.) are applied to elements on web, browsers automatically apply default focus styling (typically a blue outline) to make keyboard navigation visible for accessibility. This is correct behavior for desktop keyboard users, but on mobile web:

    1. Elements may receive programmatic focus during page load or navigation
    2. The blue outline appears visually even though no keyboard navigation is occurring
    3. The user experience is degraded with unexpected visual artifacts

    The PR did not include CSS rules to manage focus styling on these newly-semantic elements, particularly for mobile contexts where keyboard navigation is rare. A proper fix would need to:

    • Add :focus-visible or :focus CSS rules to suppress outlines on mobile
    • Or use tabIndex="-1" on non-interactive semantic elements
    • While preserving keyboard accessibility for screen reader users
  7. MelvinBot commented on Feb 24, 2026

    @MelvinBot
    Contributor

    Proposal

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

    On Android mWeb Chrome, after refreshing the page a blue outline appears on the Concierge button in the sidebar. After opening a chat, a blue outline appears on the back button in the chat header.

    What is the root cause of that problem?

    The root cause is two mechanisms working together:

    1. shouldMoveAccessibilityFocus in ScreenWrapper (src/components/ScreenWrapper/index.tsx:116) — On mobile web (getPlatform() === CONST.PLATFORM.WEB && isMobile()), after each screen transition, a useEffect (lines 229-265) queries for the first focusable element (button, [href], [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])) and programmatically calls .focus() on it.

    2. Global :focus-visible CSS (web/index.html:64-67) — A global rule applies box-shadow: inset 0px 0px 0px 1px #5AB0FF to any :focus-visible element. On Android Chrome, programmatic .focus() calls can trigger :focus-visible (unlike desktop Chrome which distinguishes keyboard vs programmatic focus).

    After a page refresh or navigation, shouldMoveAccessibilityFocus fires, finds the first focusable button (Concierge row in the LHN sidebar, or back button in the chat header), calls .focus(), and Android Chrome applies :focus-visible, which triggers the blue box-shadow.

    Note on PR #82518: This PR was flagged as the cause, but after thorough analysis, none of its changes (adding aria-describedby, accessibilityLiveRegion="polite", role="table/row/cell/list/listitem") affect focus management, tab order, or :focus-visible behavior. The roles it added (table, row, cell, columnheader, list, listitem) are NOT in the set of roles that react-native-web makes focusable (button, checkbox, link, radio, textbox, switch). The issue is likely pre-existing or was introduced by a different PR in the same deploy. Other components already work around this exact same blue focus ring problem by calling .blur() after interactions (see FloatingActionButton.tsx:77-78, FloatingReceiptButton.tsx:36, AttachmentPickerWithMenuItems.tsx:448).

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

    Option A (targeted fix): In ScreenWrapper/index.tsx, after the programmatic .focus() call on line 259, immediately call .blur() if the focus was applied only for accessibility purposes (i.e., when shouldMoveAccessibilityFocus is true but the focus is not from a keyboard interaction). Alternatively, use element.focus({ preventScroll: true, focusVisible: false }) where supported.

    Option B (CSS-level fix): Add a CSS rule that suppresses :focus-visible box-shadow specifically on mobile/touch devices where programmatic focus shouldn't show visual focus indicators. For example, adding a data-focus-from-a11y attribute when focusing programmatically and a CSS rule like [data-focus-from-a11y]:focus-visible { box-shadow: none; }.

    Option C (consistent with existing patterns): Follow the pattern already used in FloatingActionButton, FloatingReceiptButton, and AttachmentPickerWithMenuItems — call .blur() immediately after .focus() in the shouldMoveAccessibilityFocus effect. This preserves the accessibility announcement while removing the visual focus ring.

    What alternative solutions did you explore? (Optional)

    • Reverting PR fix: [Accessibility][Tracking] Other Accessibility Issues #82518 would likely NOT fix this issue since none of its changes affect focus behavior.
    • Adding outline: none or box-shadow: none to individual Pressable components was considered, but this would be a whack-a-mole approach since any focusable element can be affected.
    • Using :focus:not(:focus-visible) CSS selector was considered but has inconsistent support on Android Chrome.
    Detailed Investigation

    Evidence Chain

    1. Global :focus-visible CSS at web/index.html:64-67:
    :focus-visible {
        outline: 0;
        box-shadow: inset 0px 0px 0px 1px #5AB0FF;
    }
    1. shouldMoveAccessibilityFocus at ScreenWrapper/index.tsx:116:
    const shouldMoveAccessibilityFocus = getPlatform() === CONST.PLATFORM.WEB && isMobile();
    1. Programmatic focus at ScreenWrapper/index.tsx:248-259:
    const focusTargets = element.querySelectorAll<HTMLElement>(
        'button, [href], [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])'
    );
    for (const focusTarget of focusTargets) {
        // ... skip disabled/hidden ...
        focusTarget.focus(); // <-- This triggers :focus-visible on Android Chrome
    }
    1. Existing workarounds in the codebase confirm this is a known issue:
      • FloatingActionButton.tsx:77: // Drop focus to avoid blue focus ring.
      • FloatingReceiptButton.tsx:36: // Drop focus to avoid blue focus ring.
      • AttachmentPickerWithMenuItems.tsx:448: // Drop focus to avoid blue focus ring.

    Relevant Code

    • src/components/ScreenWrapper/index.tsx:116,229-265 - The shouldMoveAccessibilityFocus mechanism
    • web/index.html:64-67 - Global :focus-visible CSS rule
    • src/components/Pressable/GenericPressable/implementation/index.tsx:16 - WebGenericPressable sets tabIndex=0
    • src/components/LHNOptionsList/OptionRowLHN.tsx:214-251 - LHN rows (Concierge) use role=BUTTON
    • src/components/HeaderWithBackButton/index.tsx:225-248 - Back button uses PressableWithoutFeedback
    • src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx:194 - noSelect (with boxShadow: 'none') only applied when disabled

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

  8. 4 remaining items

  9. changed the title [-]mweb - Blue outline appears on Concierge button and app back button[/-] [+][$250] mweb - Blue outline appears on Concierge button and app back button[/+] on Feb 24, 2026
  10. melvin-bot commented on Feb 24, 2026

    @melvin-bot
  11. TaduJR commented on Feb 24, 2026

    @TaduJR
    Contributor

    Taking a look

  12. genesis-ai-labs-star commented on Feb 24, 2026

    @genesis-ai-labs-star

    Proposal

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

    On Android mWeb Chrome, a blue outline (focus ring) unexpectedly appears on the Concierge button after a page refresh and on the back button after navigating to a chat.

    What is the root cause of that problem?

    The issue stems from the interaction between ScreenWrapper's accessibility focus management and global CSS:

    1. ScreenWrapper (at src/components/ScreenWrapper/index.tsx) has a useEffect that programmatically calls .focus() on the first focusable element to assist screen readers on mobile web.
    2. Android Chrome treats programmatic .focus() as a trigger for the :focus-visible pseudo-class.
    3. The global CSS in web/index.html applies a blue box-shadow to any element matching :focus-visible.

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

    We should follow the established pattern in the codebase (used in FloatingActionButton and AttachmentPickerWithMenuItems) to drop the visual focus immediately after the programmatic focus is set for accessibility.

    In src/components/ScreenWrapper/index.tsx, within the useEffect that handles shouldMoveAccessibilityFocus, we should call .blur() on the element immediately after calling .focus(). This ensures the accessibility announcement is triggered but the visual focus ring is removed.

    What alternative solutions did you explore? (Optional)

  13. melvin-bot commented on Feb 24, 2026

    @melvin-bot

    📣 @genesis-ai-labs-star! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  14. victoreronmosele commented on Feb 24, 2026

    @victoreronmosele
    Contributor

    Proposal

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

    On mobile web, a blue outline appears on the Concierge button after refreshing and on the app back button after opening a chat.

    What is the root cause of that problem?

    On mobile web, we move focus to the first focusable element after a screen ends its transition.

    Here we set shouldMoveAccessibilityFocus when the app is running on mobile web:

    const shouldMoveAccessibilityFocus = getPlatform() === CONST.PLATFORM.WEB && isMobile();

    shouldMoveAccessibilityFocus is then used in a check before moving the focus when transition ends:

    useEffect(() => {
    if (!shouldMoveAccessibilityFocus || !didScreenTransitionEnd || !isFocused) {
    return;
    }
    if (typeof document === 'undefined') {
    return;
    }
    const element = screenWrapperRef.current;
    if (!element || !('contains' in element) || !('querySelectorAll' in element)) {
    return;
    }
    const activeElement = document.activeElement;
    if (activeElement && element.contains(activeElement)) {
    return;
    }
    const focusTargets = element.querySelectorAll<HTMLElement>('button, [href], [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])');
    for (const focusTarget of focusTargets) {
    const isDisabledTarget = focusTarget.matches(':disabled') || focusTarget.getAttribute('aria-disabled')?.toLowerCase() === 'true';
    if (isDisabledTarget || focusTarget.getAttribute('aria-hidden') === 'true') {
    continue;
    }
    if (focusTarget === activeElement) {
    return;
    }
    focusTarget.focus();
    const focusedElement = document.activeElement;
    if (focusedElement === focusTarget || (focusedElement && focusTarget.contains(focusedElement))) {
    return;
    }
    }
    }, [didScreenTransitionEnd, isFocused, shouldMoveAccessibilityFocus]);

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

    We detect when we move focus programmatically and hide the outline in that case.

    • Set an attribute data-programmatic-focus when we focus programmatically.

      if (focusedElement === focusTarget || (focusedElement && focusTarget.contains(focusedElement))) {
      +     focusTarget.setAttribute('data-programmatic-focus', '');
      +     const removeProgrammaticFocusAttr = () => {
      +         focusTarget.removeAttribute('data-programmatic-focus');
      +     };
      +     focusTarget.addEventListener('blur', removeProgrammaticFocusAttr, {once: true});
            return;
      }
    • Update the focus:visible CSS style in web/index.html to not show the outline when focus is programmatic:

      -:focus-visible {
      +:focus-visible:not([data-programmatic-focus]) {
           outline: 0;
           box-shadow: inset 0px 0px 0px 1px #5AB0FF;
       }
      -:focus-visible[data-inner-box-shadow-element]{
      +:focus-visible:not([data-programmatic-focus])[data-inner-box-shadow-element]{
           overflow: hidden;
       }
      -:focus-visible[data-inner-box-shadow-element]::before {
      +:focus-visible:not([data-programmatic-focus])[data-inner-box-shadow-element]::before {
           content: '';
           position: absolute;
           top: 0;
           left: 0;
           right: 0;
           bottom: 0;
           box-shadow: inset 0px 0px 0px 1px #5AB0FF;
           pointer-events: none;
           z-index: 1000;
        }
      -:focus[data-focusvisible-polyfill] {
      +:focus[data-focusvisible-polyfill]:not([data-programmatic-focus]) {
           outline: 0;
           box-shadow: inset 0px 0px 0px 1px #5AB0FF;
        }
  15. TaduJR commented on Feb 24, 2026

    @TaduJR
    Contributor

    I investigated, and I don't think it's regression from my PR.

    I am suspecting this PR #81390

  16. TaduJR commented on Feb 24, 2026

    @TaduJR
    Contributor

    Can you confirm the above?

    cc @marufsharifi @suneox

  17. Julesssss commented on Feb 24, 2026

    @Julesssss
    Contributor

    Attempting a revert

  18. Julesssss commented on Feb 24, 2026

    @Julesssss
    Contributor

    I am suspecting this PR #81390

    Verified the issue came from this ^ reverted here and now awaiting QA testing.

  19. m-natarajan commented on Feb 24, 2026

    @m-natarajan

    Can’t reproduce, Xiaomi Redmi Note 10 / Chrome, 9.3.25-13

    Screenrecorder-2026-02-24-23-15-40-407.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions