Skip to content

fix(ui): let Space tick package rows on macOS and have VoiceOver say so - #29

Open
math65 wants to merge 1 commit into
Timtam:mainfrom
math65:fix/macos-space-toggles-packages
Open

math65 wants to merge 1 commit into
Timtam:mainfrom
math65:fix/macos-space-toggles-packages

Conversation

@math65

@math65 math65 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #28.

What was wrong

On macOS the packages list is a wxDataViewCtrl whose checkbox column only changes on a click. VoiceOver sends one for VO+Space while the user is interacting with the list, but a plain Space reached no handler at all. So unless you knew to interact first, nothing could be ticked from the keyboard, which is what xogium hit.

What changed

  • Space ticks the selected row (package, configuration step or group). It runs the exact same toggle as a click: the model's set_value body moved into a shared closure that both call. Disabled rows are left alone, as with a click.
  • VoiceOver says the new state. A toggle made from code gives VoiceOver nothing to read, because the row it's on is rebuilt behind it. A small voiceover module posts NSAccessibilityAnnouncementRequestedNotification with "Checked" / "Unchecked" (new keys in all five locales). It builds the dictionary with CoreFoundation's toll-free bridged types, so there are no Objective-C runtime calls and no new crates.
  • The toggle column's state is read through one helper, packages_tree_toggle_state, which also replaces the four copies of the group aggregate in get_value. Most of the diff's line count is that closure moving and being re-indented.

Testing

Validated on macOS with VoiceOver (fr-FR): Space on packages, groups and a disabled row; VO+Space while interacting still toggles once and isn't doubled. cargo fmt, cargo clippy -p rabbit-ui-wxdragon --features gui (no new warnings) and cargo test are clean locally.

Windows is untouched: all of this sits in the non-Windows DataView path, apart from the two locale keys.

Heads-up: this will conflict with #27 (the UI crate split), since it edits the DataView page and model. Happy to rebase whichever lands second.

🤖 Generated with Claude Code

On macOS the packages list is a wxDataViewCtrl whose checkbox column only
changes on a click. VoiceOver sends one for VO+Space while interacting with
the list, but a plain Space reached no handler at all, so a keyboard user
could not tick anything (Timtam#28).

Space on the selected row now runs the same toggle as a click: the
model's set_value body moved into a shared closure that both call, and
the toggle column's state is read through one helper, which also replaces
the four copies of the group aggregate in get_value. Disabled rows are
left alone, as with a click.

A toggle made from code gives VoiceOver nothing to read, because the row
it is on is rebuilt behind it. A small voiceover module posts
NSAccessibilityAnnouncementRequestedNotification with the row's new state
("Checked" / "Unchecked", in all five locales). It uses CoreFoundation's
toll-free bridged types, so no Objective-C runtime calls or new crates.

Fixes Timtam#28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unable to use checkboxes on MacOS

1 participant