Bug 500840

Summary: Action buttons in header global toolbars of pages in the pageStack are in the tab focus chain even if the page itself is not visible
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: cwo <cwo.kde>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, notmart
Priority: NOR Keywords: accessibility, usability
Version First Reported In: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.14
Sentry Crash Report:

Description cwo 2025-02-27 21:52:02 UTC
SUMMARY

Buttons that are not visible generally should not receive tab focus. This is true for buttons on pages, but it is not true for buttons in the global toolbar. The buttons can even be activated- 

STEPS TO REPRODUCE
1. Open KDE Connect
2. Click a Device
3. Click Settings in the tool bar
4. Click the clipboard settings
5. Press tab five times (if you're not on master, focus the first checkbox beforehand, and press tab three times instead)
6. Press space

OBSERVED RESULT

Before pressing space, focus is apparently nowhere. After pressing space, the device is disconnected, because the toolbar button from the device page (after step 2) was focused.

EXPECTED RESULT

Keyboard focus should stay on visible things, not move to parts of different pages. 

SOFTWARE/OS VERSIONS

master, couple days old. Also on Fedora 41.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.12.15-200.fc41.x86_64 (64-bit)


ADDITIONAL INFORMATION

Same issue can be seen in plasma-welcome - from the start, press tab twice and the "Supporters" page opens; this is actually on the final page. If you start from a page in between, you can also open the Hamburger menu (which is only on the first page) from a page it is not on. Or with kirigami2gallery on Multiple Columns by adding enough columns that some don't fit the visible area.
Comment 1 Bug Janitor Service 2025-04-07 13:59:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1757
Comment 2 Marco Martin 2025-04-09 07:34:08 UTC
Git commit df293ea6bc8d593cce405598ca7f09cb781902e1 by Marco Martin.
Committed on 09/04/2025 at 07:34.
Pushed by mart into branch 'master'.

disable/enable headers too when going out of view

pages get disabled when they go oout of view.
do the same thing for headers otherwise they'll stay
in the tab focus order

M  +12   -0    src/layouts/columnview.cpp

https://invent.kde.org/frameworks/kirigami/-/commit/df293ea6bc8d593cce405598ca7f09cb781902e1