SUMMARY The order in which System Monitor cycles through its UI elements when repeatedly pressing the "tab" key is all over the place. STEPS TO REPRODUCE 1. Open the System Monitor (meta+esc) 2. Select the Processes view 3. Press tab repeatedly OBSERVED RESULT Tab cycles through UI elements in this order: * Search bar (main toolbar) * Nothing (?) * Main content * Left side-bar * Toolbar of the left side bar (IN REVERSE ORDER: Right-to-left) * Main toolbar (IN REVERSE ORDER: Right-to-left) EXPECTED RESULT I'm guessing HIG defines a "correct" order, but I would expect something like: * Main toolbar (left to right, starting at the search bar) * Main content * Left side bar * Toolbar of the left side bar (left to right) SOFTWARE/OS VERSIONS Linux: openSUSE Tumbleweed 6.1.3 KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION Running Wayland
Can confirm on git master.
There are two primary issues here: - The sidebar responds to both the tab key as well as the arrow keys - The header buttons seem to get tabbed through in reverse order, perhaps due to the ActionToolbar being right-aligned? Overall everything seems backwards.
I've looked into what's up with the tab where nothing seems to happen. (Between search bar and the Listview) It's getting stuck on the Header of the ListView, which has no keyboard functionality that I could find, but can still take keyboard focus. In principle, this would be good to have changing the sort order keyboard-accessible, but I think that would require rewriting the whole table to use item selection mode, rather than row selection mode. Might be best to disable this until then. I assume the sidebar entries being both keyboard and tab-focusable is because they are Actions. Not sure about the header order being reversed, the order in the code seems to be as on screen, but the tab order is reversed.
I believe tab order is based on creation order, since ActionToolBar creates things asynchronously it most likely ends up with the last item being created first. There is another issue not mentioned here, which is that we lack clear focus highlights in qqc2-desktop-style which makes it incredibly hard to actually figure out what has focus.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/303
Git commit 25fb7be898452c84f29d1c56b601666168597589 by Christoph Wolk. Committed on 01/08/2024 at 09:21. Pushed by ngraham into branch 'master'. TableViewHeader: remove from tab chain The TableViewHeader currently is part of the tab chain. Once it has keyboard focus, however, the user can do absolutely nothing there. To the user pressing tab to navigate the application by keyboard, it seems like the tab focus ends up nowhere. Having the header accept focus would make sense if the user could actually control the sort order of the table this way, but this would require larger changes to the way tables are handled. This change removes TableViewHeaders from the tab chain. They can be included again once the work has been done to make them actually useful for keyboard users. M +1 -0 src/table/TableViewHeader.qml https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/25fb7be898452c84f29d1c56b601666168597589
Git commit 7125bff6edfcf973905e93584c11ec13686affec by Nate Graham. Committed on 01/08/2024 at 13:15. Pushed by ngraham into branch 'Plasma/6.1'. TableViewHeader: remove from tab chain The TableViewHeader currently is part of the tab chain. Once it has keyboard focus, however, the user can do absolutely nothing there. To the user pressing tab to navigate the application by keyboard, it seems like the tab focus ends up nowhere. Having the header accept focus would make sense if the user could actually control the sort order of the table this way, but this would require larger changes to the way tables are handled. This change removes TableViewHeaders from the tab chain. They can be included again once the work has been done to make them actually useful for keyboard users. (cherry picked from commit 25fb7be898452c84f29d1c56b601666168597589) Co-authored-by: Christoph Wolk <christoph.wolk@gmx.de> M +1 -0 src/table/TableViewHeader.qml https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/7125bff6edfcf973905e93584c11ec13686affec
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1609
Git commit 08d7cb277872c0a013a596b0189d4c7228c632fb by Arjen Hiemstra. Committed on 10/10/2024 at 14:05. Pushed by ahiemstra into branch 'master'. layout: Reverse the stacking order of items inserted into ToolBarLayout Due to async creation, we end up finishing the last item first. So after inserting these, reverse the stacking order for these so we end up with a more appropriate tab order for the actions. M +9 -0 src/layouts/toolbarlayout.cpp https://invent.kde.org/frameworks/kirigami/-/commit/08d7cb277872c0a013a596b0189d4c7228c632fb