Repository navigation
Let accessibility press and name every button in the window - #18
Merged
Merged
Conversation
# Conflicts: # lib/ui/compact_icon_button.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes HIS-21. On macOS, VoiceOver, Voice Control and AXPress press a control through its semantics tap action and read its name from its semantics label. Several of the window's controls were missing one or the other.
What was wrong
CompactIconButton). These are Show/Hide notes, Pin, More, the insert bar, Back to all notes and the drawing dock. Each one came out as two nodes: the outer node carried the tooltip and no action, and the inner one could be pressed but had no name. This gap dates from the old UI (2 Sep), not from the redesign.Fix
CompactIconButtonmerges into one node that carries the press, the tooltip and, on desktop, a label taken from the tooltip.Tests
test/button_press_test.dartpresses each control the way an assistive technology does, through the semantics tap and with no pointer. It covers a rail item, a tonal button, a keycap (read with its button and never on its own), the icon buttons, the list controls and See all.The file also walks the whole window in several states and fails on any enabled button that can't be pressed, or any pressable element with no name. The states are: list open, list hidden, More open, media filter open, a drawing with the colour popover open, the archive, and Settings. The tests fail on main and pass here.
Checked on macOS
I ran a sync-off profile build of this branch as
com.kapybara.kapynotes.kapy12, built withKAPYNOTES_SYNC=falseand its own keychain. Its container had nosync.v1orbilling.v1, and the launch didn't take focus or register a login item; those were local, uncommitted changes for the check only. I drove it with the AX API.That check ran before main (#17) was merged in. Merging main doesn't touch the rail item or New note, and the Drawings controls #17 brought in are covered by the widget tests above.
Flutter's macOS embedder doesn't publish the semantics tree until a client asks for the enhanced interface (
AXEnhancedUserInterface). VoiceOver does that, but a plain AppleScript UI query doesn't. That's why the preview capture found no buttons to press.flutter analyzeis clean, and the full suite passes locally (2145 passed, 8 skipped) on Flutter 3.47.4 withpub get --enforce-lockfile, because the 3.47.2 install on this Mac is damaged. No goldens moved.