Skip to content

Conversation

@chrisglein
Copy link
Member

Description

Why

When you tab through Gallery, you hit the closed drawer items. Those items should not be keyboard focusable.

Related to #408

What

Removed the drawer content entirely when the drawer is in the closed state.
Additionally changed the drawer mode to not be "permanent", which didn't seem to be the cause here but also doesn't seem to be necessary.

Screenshots

Here is gallery with the fix:
https://github.com/microsoft/react-native-gallery/assets/26607885/fcf25e92-450d-4627-8f4d-c8027e3a8f88

This was causing the custom drawer content to render _even when the drawer was closed_.
And that meant you could tab through items that shouldn't even be rendered.
@Yajur-Grover
Copy link
Contributor

@chrisglein
Copy link
Member Author

chrisglein commented Apr 23, 2024

Tested it locally - looks like there's still one phantom tab stop now on the home page:

Yep, I'm still seeing one. So it matches #408 (instead of having a ton). Of note, you can get some if you have some logbox warnings. I'm going to check a release build and see if that removes the last tab stop. If not... well it's still cutting down on the many drawer ones.

From the focusable warning call stack, looks like it's still focusing on a Drawer item?

Yep, that's preexisting (#407). I'm working on a change to refactor the drawer entirely and I'm hoping we can fix that error at the same time.

@chrisglein chrisglein marked this pull request as ready for review April 23, 2024 00:37
@chrisglein
Copy link
Member Author

Release build still had one phantom tab stop (#408). So that seems to be a general issue with the react-navigation implementation that we'll need to address separately.

@chrisglein chrisglein merged commit e9fe556 into microsoft:main Apr 23, 2024
@chrisglein chrisglein deleted the noPermaDrawer branch April 23, 2024 21:04
@chrisglein chrisglein linked an issue Apr 24, 2024 that may be closed by this pull request
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.

Too many items in tab index when navigation pane is expanded.

3 participants