Make every settings row reachable, and every accessibility switch honest

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-24 21:03:36 -04:00
parent e1ff25fc66
commit 9ffaf45a4d
33 changed files with 2384 additions and 76 deletions
@@ -23,6 +23,11 @@ SettingRow {
controlWidth: Math.max(110, button.implicitWidth + 8)
function press(): void {
if (root.enabled)
root.triggered();
}
SettingsButton {
id: button
anchors.right: parent.right
@@ -30,5 +35,33 @@ SettingRow {
text: root.action
enabled: root.enabled
onClicked: root.triggered()
activeFocusOnTab: root.enabled
// The row's label is what the button is FOR; the button's own caption
// is what pressing it does. Both are said, in that order.
Accessible.role: Accessible.Button
Accessible.name: root.label
Accessible.description: root.detail === ""
? root.action
: `${root.detail} ${root.action}`
Accessible.focusable: root.enabled
Accessible.focused: button.activeFocus
Accessible.onPressAction: root.press()
Keys.onReturnPressed: root.press()
Keys.onEnterPressed: root.press()
Keys.onSpacePressed: root.press()
// Focus ring only -- the button keeps its own border at rest.
Rectangle {
anchors.fill: parent
anchors.margins: -3
radius: 11
color: "transparent"
visible: button.activeFocus
border.width: 2
border.color: Theme.accentSecondary
}
}
}