Skip to content

Fix known keyboard navigation bugs #9058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

asoucar
Copy link
Contributor

@asoucar asoucar commented Apr 10, 2025

Explicitly adding the focusable field to the RecipientSelectView allows it to be navigated through via arrow keys.
Explicitly adding the focusable field to the Floating Action Button for Compose adds it to the tab navigation. Moving it to the first child of the parent Layout Coordinator allows for it to be focused before the messages in the list while retaining its position. I will say the focus on the compose button is very faint and hard to see. It may be worth investigating during a future refactor
Using Ctrl-Tab shifts tab focus to the top navigation bar and its assorted buttons.

Fixes #8230, #5852
Edit: Removed #8321 from fixes list as it appears to work locally but did not work on some Samsung devices, which I don't have access to for testing

@asoucar asoucar requested review from kewisch and wmontwe as code owners April 10, 2025 21:02
@kewisch
Copy link
Member

kewisch commented Apr 11, 2025

I'm able to confirm #8230 is solved, it is possible to focus the compose button with Shift+Tab as you mentioned. I'd say it is still not ideal, if you shift tab once too often you end up in the middle of the list and there is no way to get back to the compose button aside from going all the way up again. I'm not very familar with tab navigation on Android, but would it be reasonable behavior that Ctrl+Tab switches between toolbar, message list and compose button?

#8231 is still an issue for me. I am in the compose screen and can tab forward from the "From" line to the "To" line, but from there I cannot get to the subject or message text. I tried both tabbing forward and the arrow keys. My setup is an Apple Magic Keyboard connected via USB to a Samsung device. Did I miss anything here?

Confirming also #5852 is fixed with Ctrl+Tab.

@kewisch kewisch self-assigned this Apr 11, 2025
@asoucar
Copy link
Contributor Author

asoucar commented Apr 11, 2025

I'm able to confirm #8230 is solved, it is possible to focus the compose button with Shift+Tab as you mentioned. I'd say it is still not ideal, if you shift tab once too often you end up in the middle of the list and there is no way to get back to the compose button aside from going all the way up again. I'm not very familar with tab navigation on Android, but would it be reasonable behavior that Ctrl+Tab switches between toolbar, message list and compose button?

#8231 is still an issue for me. I am in the compose screen and can tab forward from the "From" line to the "To" line, but from there I cannot get to the subject or message text. I tried both tabbing forward and the arrow keys. My setup is an Apple Magic Keyboard connected via USB to a Samsung device. Did I miss anything here?

For #8231 I tested this on several emulators with no issue, including the device configuration mentioned in the bug. I don't have a physical Samsung device to test on. If this is an issue that is reacting differently between emulators and device I can remove it from the ticket as I have no way to test it.
For #8230 you are right, enough tab/ctrl-tab can lose you access to the compose button. The issue is the view hierarchy. When you Ctrl-tab the toolbar is the parent view to both the message list and the compose button so you can't just jump between them. I will see if I can adjust the hierarchy to fix this, but more likely this would require a large refactor of the view

@asoucar
Copy link
Contributor Author

asoucar commented Apr 14, 2025

@kewisch I was not able to simply restructure the views to get the floating compose button to be always quickly reachable via tab unfortunately. I think a larger restructure will be necessary. I think it is worth merging this fix for what it does and make a note of the rest for future work.
I am also removing #8231 from the fixes list as I cannot reproduce with my current emulator setup.

@kewisch
Copy link
Member

kewisch commented Apr 15, 2025

Sounds good, thanks for checking!

@kewisch kewisch merged commit 9b98b37 into thunderbird:main Apr 15, 2025
3 checks passed
@thunderbird-botmobile
Copy link
Contributor

Thanks for your contribution! Your pull request has been merged and will be part of Thunderbird 11. We appreciate the time and effort you put into improving Thunderbird. If you haven’t already, you’re welcome to join our Matrix chat for contributors. It’s where we discuss development and help each other out. https://matrix.to/#/#tb-android-dev:mozilla.org
Hope to see you there! 🚀📱🐦

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.

Compose button not focusable by keyboard
2 participants