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
@@ -24,10 +24,43 @@ SettingRow {
detail: root.spec ? root.spec.detail : ""
controlWidth: 48
// Space and Enter write the same value the pointer would, through the same
// verified path -- there is no second way to flip a preference here.
function flip(): void {
SystemSettings.commitPreference(root.setting, !root.checked);
}
SettingsToggle {
id: toggle
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
checked: root.checked
onToggled: value => SystemSettings.commitPreference(root.setting, value)
activeFocusOnTab: true
Accessible.role: Accessible.CheckBox
Accessible.name: root.label
Accessible.description: root.detail
Accessible.checked: root.checked
Accessible.focusable: true
Accessible.focused: toggle.activeFocus
Accessible.onPressAction: root.flip()
Keys.onReturnPressed: root.flip()
Keys.onEnterPressed: root.flip()
Keys.onSpacePressed: root.flip()
// Focus ring only -- the switch keeps its own border at rest.
Rectangle {
anchors.fill: parent
anchors.margins: -3
radius: height / 2
color: "transparent"
visible: toggle.activeFocus
border.width: 2
border.color: Theme.accentSecondary
}
}
}