Skip to content

Fix: [Web] [WIP] focus orchestration for keyboard intent, programmatic restore#86516

Draft
mavrickdeveloper wants to merge 2 commits into
Expensify:mainfrom
mavrickdeveloper:pr-79834-fix-only-clean
Draft

Fix: [Web] [WIP] focus orchestration for keyboard intent, programmatic restore#86516
mavrickdeveloper wants to merge 2 commits into
Expensify:mainfrom
mavrickdeveloper:pr-79834-fix-only-clean

Conversation

@mavrickdeveloper

@mavrickdeveloper mavrickdeveloper commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

  • This is the clean, fix-only extraction of the web focus work from fix: [Web] Focus restoration mechanism on back navigation (#76921) #79834.
  • Route-level focus restoration now keeps keyboard intent separate from pointer and touch interactions. NavigationFocusManager stores interaction provenance, and FocusTrapForScreen only restores route focus when the navigation came from keyboard activation.
  • Restored elements now go through a shared programmatic-focus helper so they get the programmatic-focus marker and use preventScroll: true.
  • For single-select lists, the checkbox indicator is removed from the tab order so keyboard traversal stays on the row instead of falling into the nested control.

Fixed Issues

$ #76921
PROPOSAL: #76921 (comment)

Fixed sub issues

#85886
#85871
#85873
#85895
#85896
#85874
#85878
#85881
#85866
#85868

Tests

@mavrickdeveloper mavrickdeveloper changed the title fix: [Web] focus orchestration for keyboard intent, programmatic restore, and list focus ownership fix: [Web] [WIP] focus orchestration for keyboard intent, programmatic restore Mar 27, 2026
@mavrickdeveloper mavrickdeveloper changed the title fix: [Web] [WIP] focus orchestration for keyboard intent, programmatic restore Fix: [Web] [WIP] focus orchestration for keyboard intent, programmatic restore Mar 27, 2026
@mavrickdeveloper mavrickdeveloper force-pushed the pr-79834-fix-only-clean branch from 3155c5d to aa05635 Compare March 27, 2026 11:00
@codecov

codecov Bot commented Mar 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/App.tsx 100.00% <100.00%> (ø)
...ts/SelectionList/ListItem/SingleSelectListItem.tsx 88.88% <ø> (+88.88%) ⬆️
...c/hooks/useSyncFocus/useSyncFocusImplementation.ts 100.00% <100.00%> (ø)
src/libs/Navigation/NavigationRoot.tsx 77.17% <100.00%> (+0.25%) ⬆️
src/libs/NavigationFocusManager/constants.ts 100.00% <100.00%> (ø)
...ponents/FocusTrap/FocusTrapForScreen/index.web.tsx 89.36% <97.05%> (+89.36%) ⬆️
src/hooks/useAccessibilityFocus/index.ts 0.00% <0.00%> (ø)
src/libs/NavigationFocusManager/index.ts 26.66% <26.66%> (ø)
...rc/libs/focusUtils/focusElementProgrammatically.ts 51.51% <51.51%> (ø)
src/libs/NavigationFocusManager/index.web.ts 90.39% <90.39%> (ø)
... and 21 files with indirect coverage changes

@mavrickdeveloper mavrickdeveloper force-pushed the pr-79834-fix-only-clean branch from aa05635 to ed23779 Compare March 27, 2026 11:13
@mavrickdeveloper mavrickdeveloper force-pushed the pr-79834-fix-only-clean branch from 1b8aaee to 644d7b9 Compare March 28, 2026 05:43
# Conflicts:
#	src/components/SelectionList/ListItem/SingleSelectListItem.tsx
#	src/components/SelectionList/components/SelectionCheckbox.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant