Skip to content

fix: keep maps as single tab focus targets#935

Merged
dkhawk merged 4 commits into
googlemaps:mainfrom
himu-gupta:fix/googlemap-tab-focus
Jun 29, 2026
Merged

fix: keep maps as single tab focus targets#935
dkhawk merged 4 commits into
googlemaps:mainfrom
himu-gupta:fix/googlemap-tab-focus

Conversation

@himu-gupta

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Keep the embedded MapView as the first keyboard focus target for the map so forward Tab navigation treats each GoogleMap as one focus stop before moving to the next Compose item.

Tests:

  • ./gradlew :maps-compose:compileDebugKotlin :maps-app:compileDebugAndroidTestKotlin
  • ./gradlew :maps-app:assembleDebug
  • ./gradlew :maps-compose:lintDebug :maps-app:lintDebug
  • ./gradlew :maps-app:lintDebug

Fixes #791 🦕

This ensures that the Compose focus system can successfully target the AndroidView wrapper, allowing focus traversal (TAB) to work correctly and resolving test failures.

TAG=agy
CONV=c8ea8596-9a4a-488b-885a-df4f8d27c209
@dkhawk dkhawk requested a review from kikoso June 26, 2026 00:11
dkhawk added 2 commits June 29, 2026 16:53
Adds inline comments explaining the Compose and View-level focus configuration on GoogleMap, and KDoc to the focus traversal test class.

TAG=agy
CONV=c8ea8596-9a4a-488b-885a-df4f8d27c209
@dkhawk dkhawk merged commit 2f5b340 into googlemaps:main Jun 29, 2026
8 checks passed
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.

Keyboard navigation: pressing TAB (Next focusable item) while GoogleMaps is focused skips the next focusable element

2 participants