Repository navigation
Improve focus handling and accessibility in Connect dialog - #3859
Conversation
|
OK, here's an alternative suggestion. When the connect dialog opens or on change of current Directory through the drop down, set "default Server" to the Directory. (Hm. Not sure on this -- if there's anything in the Server text field, that should still take precedence at this point, I think.) When "Connect" is clicked, connect to "default Server". (Maybe that's not the best name for it, actually.) (All of those are standard events from the widgets.) |
Well, for what it's worth, I don't actually like this at all! Touché!
You probably mean "selectedServer" or "chosenServer", but I don't think this is the right approach anyway. It's certainly not DRY. We already have the information in the widgets. Certainly, setting to the directory would be wrong if there is a value in the server address field. Many times I open the connect dialog, and immediately click Connect because the server I want is already in the server address field. But to me it's still logical that if there is a selected item in the server list, clicking Connect should use it, even if the list doesn't have focus. Therefore we need a way to unselect it if the user wants to use a custom server address. That will have been exactly why Volker made the list item be deselected when any change was made to the server address field. I still maintain that it is logical actually to do that as soon as the server Address field gains focus, as that action indicates that server is the server of interest to the user, not the one that was selected in the list. If your objection boils down to the fact that the selection in the list is forgotten when focussing on the server address field, this can be overcome by saving the identity of the selected item before clearing the selection. Then if and when the server list is again given focus, either by tabbing, or by clicking in an empty area of it (if it's not full), we see there is a saved I have added a commit which does exactly that, and have tested it. I really do hope that overcomes your objection. |
|
Somehow, yes, that works better for me. I'm still not sure about what should happen on switching focus with tab. I'd never really noticed the old behaviour -- I guess I'd not have a selected server list entry if I was entering text into the Server text box (Would |
Well at the moment, pressing tab while in a list of servers just moves to the next server in the list, and shift-tab moves to the previous server. Down-arrow and up-arrow to the same. I think only the arrow keys should move up and down, and tab should move to the next widget (which is the Server Address box), without changing the selection. I'm not sure how to fix that, so it would need investigation and a separate PR.
Yes, I think that's the case for most people, which would be why #3857 has only come to light now.
I just checked that. In all versions up till now, In this PR, |
My suggested change fixes that. |
I haven't seen your suggestion (can't find it on my phone), but it seems to be that |
Tab key navigation was introduced in d3b9f90 for no apparent reason. Turning it off (in the .ui file this time) feels much more natural and along the lines of OnjLouis' comment. |
The reason was so the list was keyboard navigable, I'd assume. However, the next commit says it's a "fix" -- but doesn't remove the problem:
Tab onto the Connect button and hit enter? Although I get the point: I don't understand why the first press of enter would deselect the text at all... |
Tab and Shift+Tab were being consumed to move between tree items rather than moving focus through the dialog. Arrow-key navigation within the tree remains unchanged. This restores conventional keyboard navigation and improves accessibility.
dingodoppelt
left a comment
There was a problem hiding this comment.
Works as expected, thank you very much :)
|
I've added a commit to turn off tab-key navigation within the server list, and updated the PR description. I had a conversation with ChatGPT about it, and its comments were:
Certainly in the version I built with this change:
|
That's odd. Just seen that comment, and yes, it does that for me too. I'll hold off on merging to investigate the reason for that first. |
Suggested by ChatGPT review.
2aad8ce to
cd2ef20
Compare
Fix suggested by ChatGPT
cd2ef20 to
756bde2
Compare
I've added another signal-slot connection, suggested by ChatGPT, that appears to fix that. Please could you check again? |
dingodoppelt
left a comment
There was a problem hiding this comment.
This works nicely and feels complete to me
|
OK, there's something on main that's not on release/3_12 that's causing the cherry-pick some problems - and it doesn't patch cleanly either: These both fail because Hm. Can I leave out A single squashed commit would have been easier here, too. |
|
ok, I'd need to be at the computer to check, which I can do later. I'd be happy to make a PR on release/3_12 if that would help. |
If you're okay to do the PR, that would help, yes. Thanks. I've been doing a branch off |
Yes, I think so. IIRC it was added to get access to the IPv6 availability status, which in 3.12 is just the enable flag. Working on the PR now. |
|
PR #3870 raised against |
…-focus-server Backport #3859: Improve focus handling and accessibility in Connect dialog
|
Backport merged to release/3_12. |
Short description of changes
Deselects any selected server in the server list when the Server Address combo box gains focus. This ensures that clicking
Connect when the Server Address has focus will connect to the expected server, even if a server had previously been
selected in the server list.
In addition, corrects the consuming of Tab and shift-Tab within the server list, improving keyboard navigation for accessibility.
CHANGELOG: Client: Improve server list navigation in Connect Dialog.
Context: Fixes an issue?
Fixes #3857
Does this change need documentation? What needs to be documented and how?
No
Status of this Pull Request
Ready to merge. Tested on Linux and Windows..
What is missing until this pull request can be merged?
Nothing
Checklist