Skip to content

feat(a11y): screen reader (NVDA) and keyboard support - #53

Merged
YuFeng926 merged 27 commits into
YuFeng926:standalonefrom
fdrv161:a11y-pr
Nov 16, 2026
Merged

YuFeng926 merged 27 commits into
YuFeng926:standalonefrom
fdrv161:a11y-pr

Conversation

@fdrv161

@fdrv161 fdrv161 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Hi @YuFeng926,

This is the screen reader (NVDA) and keyboard support described in issue #14, based on the current standalone (OpenTune 1.8.2 plus your latest commit). The full list of keys and behaviour is in my comment there: #14 (comment)

Please treat this as an offer. Take it, take only parts of it, or close it, whatever suits the project. I am happy either way, and I can split it into smaller pieces if that helps.

One bug worth a look even if you do not take the rest

Since 5938769 removed the per-tick preference sync, the plugin editor no longer applies the saved preferences when it opens. Source/Plugin/PluginEditor.cpp calls syncSharedAppPreferences() only from the onboarding callback and the preference paths, not from the constructor (the Standalone editor is fine). This is also in 1.8.2.

The effect in REAPER: with OpenDyne selected in Preferences, the plugin opens in the default scheme, F1 to F6 go to the host, and Read Audio makes no notes (AUTO still works). The fix is one line before startTimerHz in the constructor, in commit 3a7c01a.

What changed

  • Piano roll, per-note EQ window, sliders, Preferences, menus, dialogs and the About dialog work with NVDA and the keyboard. AUTO, Read Audio, undo/redo and edits are spoken.
  • Short messages use UI Automation notification events (Source/Utils/ScreenReaderAnnouncer), because postAnnouncement on Windows speaks through SAPI and NVDA does not hear it.
  • AccessibleToggleButton: JUCE gives toggle buttons a read-only "On"/"Off" value, so NVDA said "read only" on every check box, and a key press raised no toggle event. This class has no value and raises the UIA toggle state change.
  • Source/Plugin/ReaperHostBridge reads REAPER's edit cursor through REAPER's VST3 host interface, because REAPER does not report it to a stopped plugin. Other hosts are not affected.
  • Keyboard note audition is mixed by the document's editor renderer, the same way as your drag audition, so it also works on an item FX in REAPER while stopped. It follows your Note Transpose Preview preference for the sound after an edit.
  • Read Audio on audio that is already read, with no OpenDyne notes, now makes the notes instead of doing nothing.
  • No changes to DSP, the project format or host parameters. Shortcut schema version is 4 (F3/F5 for Pitch Modulation and Drift).

Testing

  • Tested by hand, every change: VST3 with ARA in REAPER 7.83, NVDA 2026.3, Windows 11. Also as an item FX.
  • Not tested: the Standalone app, macOS (VoiceOver), and other hosts. The Standalone code is touched only by shared classes.
  • I cannot check how this feels for mouse users. I tried not to change anything for them, but a look from someone who works with the mouse would be welcome.
  • It builds on GitHub Actions (Windows VST3, JUCE 8.0.12). I did not run your full test suite. Our workflow file is not in this PR.

Known limitations

  • The note played while moving between notes does not include the per-note EQ. Space plays the fully processed audio.
  • One newest message, "Notes made: N", is English only for now. The other new strings are in LocalizationManager.
  • Announcements raise the notification from a JUCE component provider (getNativeImplementation), which is an internal API, so they may need attention after a JUCE update.

The code was written with the help of Claude (Anthropic's AI assistant). I tested it myself.

Thank you.


(中文摘要)这个 PR 是 issue #14 中描述的读屏软件(NVDA)和键盘支持,基于当前的 standalone(1.8.2 加最新提交)。是否合并、只取一部分或关闭,都由您决定,我也可以拆分成更小的部分。

另外有一个值得单独看的问题:59387696 移除每帧同步后,插件编辑器打开时不再应用已保存的首选项,这个问题也在 1.8.2 中。在 REAPER 中选择 OpenDyne 后,插件仍以默认模式打开,F1 到 F6 传给宿主,Read Audio 不生成音符。修复只需在构造函数中调用一次 syncSharedAppPreferences(),见提交 3a7c01a。

我只手动测试了 Windows 11 上 REAPER 7.83 中的 VST3/ARA,未测试独立版、macOS 和其他宿主。没有改动 DSP、工程格式和宿主参数。代码在 Claude(Anthropic 的 AI 助手)的帮助下完成,并由我亲自测试。

🤖 Generated with Claude Code

fdrv161 and others added 27 commits October 14, 2026 15:51
Accessibility for the plugin (VST3 + ARA), tested by hand with NVDA 2026.2 in
REAPER 7.82 on Windows 11. Not tested: standalone app, macOS.

Piano roll (OpenDyne):
- The notes canvas is in the accessibility tree and takes focus ("Notes, A4 +25 ct").
- Left/Right/Home/End move between notes and play the corrected note; Shift+Left/Right
  select a range; Ctrl+A selects all; after Delete the next note is selected.
- Up/Down change the pitch (Alt = 1 cent); Ctrl+Left/Right move the end of the selected
  note and Ctrl+Shift+Left/Right its start (10 ms, same planner as the mouse); Enter does
  what a double click does.
- F3/F5/F4 with Up/Down: pitch modulation, drift, note volume. X splits a note at its
  largest sung pitch change and J merges with the next note (scissors planner and
  transaction); R returns notes to their original pitch; I reads all note details.
- Spoken results: delete/cut/copy/paste, undo/redo with the action name, AUTO,
  Read Audio progress, tool changes. Shift+F10 / menu key opens the tool menu.
  Esc goes to the host (the FX window closes as in other plugins).

Per-note EQ window: Left/Right band, Up/Down row, Tab adjusts with arrows, second Tab
types a number, Insert/Delete add/remove bands, I reads all bands, Esc closes; the remove
confirmation is a real (invisible) dialog over the painted one.

Everywhere: one slider model (arrows, Alt fine, Page Up/Down, Home = max, End = min,
Backspace = default, Enter = type a number); panel knobs say what they changed;
Preferences tabs/pages, menus, message, Pitch Shift and shortcut dialogs; named time
and tempo displays.

Implementation: JUCE AccessibilityHandler; short messages via UI Automation
notification events (Utils/ScreenReaderAnnouncer), since postAnnouncement on Windows
speaks through SAPI and NVDA does not hear it. No changes to DSP, project format or host
parameters. New strings in LocalizationManager (5 languages).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F4 + Up/Down and Enter now go through editVolumeEnvelopeRegions /
resetVolumeEnvelopeRegion, like the mouse drag and double-click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ctrl+Up/Down: the next pitch grid step (key/scale note, semitone or cent), 5 % for
  modulation and drift, 1 dB for volume. Ctrl+Shift+Up/Down: the fine step (1 cent,
  1 %, 0.1 dB). Alt+Up/Down: a semitone even in key/scale mode.
- Plain Up/Down no longer edit, so exploring cannot move a note by accident; they say
  which keys do ("Ctrl+Up/Down changes the pitch"). Ctrl+Alt+Up/Down stays the zoom.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Volume Envelope gain is applied at playback, not in the render, so the audition
after Up/Down with the volume tool sounded unchanged. It now applies the same gain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REAPER does not report the edit cursor to a stopped plugin, so Ctrl+V pasted where
playback last stopped (6.73 s) instead of at the cursor OSARA reported (4.41 s).
ReaperHostBridge reads GetCursorPosition / GetPlayState through REAPER's VST3 host
interface (IReaperHostApplication); other hosts are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Without a selection Right takes the note under the edit cursor or the next one,
  Left the note under it or the previous one (nearest note past the ends), so the
  user lands where they are in the song. Without a known cursor: the first note.
- Shift+X splits the selected note at the edit cursor ("Note split at the cursor:
  A4, B4"); says so when the cursor is unknown or outside the note.
- The cursor comes from ReaperHostBridge while the transport is stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sition

Stopping with Space in the plugin, REAPER may keep its edit cursor where playback
began (or move it only once its window is active), so paste, arrows and Shift+X used
the old place until the user switched to REAPER and back. Until the edit cursor is
moved after a stop, the stop position is used; once it is moved, the cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a note selected, Left/Right moved from that note even after playback was
paused elsewhere or the edit cursor was moved. Now, when the position changed since
the last arrow press, the arrow takes the note there, as without a selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a keyboard edit was rejected (notes changed meanwhile, no pitch data,
planner refused the split), nothing was said. Sighted users see the note
stay put and the selection highlight disappear; the screen reader now says
"Could not apply" or "Could not apply, selection cleared".

Covers Ctrl+Up/Down, R, Enter, X, Shift+X, J, Ctrl(+Shift)+Left/Right,
volume edits and Delete/Cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ays it

- REAPER's play state and positions are read on every frame (trackReaperTransport),
  so pause and stop are known exactly instead of through the plugin's delayed view.
- Paused (Ctrl+Space): the pause position (GetPlayPosition); stopped: the edit cursor;
  stopped with Space in the plugin: where playback stopped, until the edit cursor is
  moved. Moving the edit cursor after a pause or stop always wins.
- Shift+I says the position and its source: "Position 4.41 s, paused",
  "..., edit cursor", "..., where playback stopped".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A user test showed REAPER moving its edit cursor to the stop place itself, while the
plugin's own stop guess was 0.25 s later and also kicked in after a cursor move.
Stopped: always the edit cursor, the place REAPER announces. Paused is unchanged
(the pause position, matched to 0.01 s in the test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e already selected

- The first arrow after opening the window had no remembered cursor and so ignored it;
  now it takes the note at the cursor.
- When the note at the cursor is already selected, the arrow moves to its neighbour
  instead of repeating the same note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts with the shortcut dispatch scopes (016dc4a):
- KeyShortcutConfig: the author's scoped entries, with F3 / F5 kept for Pitch
  Modulation / Pitch Drift (kPianoRollOpenDyneScope).
- AppPreferences: both sides used shortcut schema 2. Schema 2 stays the author's Mac
  defaults migration; schema 3 is the F3 / F5 adoption. Tests expect 3.
- PianoRollToolHandler: findShortcutForBinding now gets the piano roll scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zoom is visual and already has shortcuts; the buttons showed up as unnamed + / -
in NVDA object navigation inside the notes list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream: in-plugin transport seek and edit cursor, external edit in the standalone,
auto-scan capture, trackpad zoom (W-MS); reference track retired; render and FCPE fixes.

Conflicts:
- Shortcut schema: 2 and 3 stay the author's Mac migrations; 4 is the F3 / F5
  adoption for Pitch Modulation / Drift. Tests expect 4.
- TransportBar: scale combos stay AccessibleComboBox; the new External edit and Save
  and return buttons have no tooltip equal to their text (NVDA read it twice).
- Preferences: the retired reference align selector is dropped as upstream.
- CMake: both new test targets kept.
Also: "External edit applied" is spoken when the returned notes are applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The text was only painted, so NVDA read nothing but the links and Close.
Each line is now a focusable static text in reading order, the window is
named, focus starts on the heading, Tab scrolls the line into view, and
Enter/Space press the focused link or button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in Plugin/PluginEditor.cpp recordRequested: took upstream
readScopeAudio(true) and moved our speech into readScopeAudio, manual
reads only ("Audio already read", "Processing audio").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts:
- Plugin/PluginEditor.cpp: took upstream readScopeAudio (auto read, silent);
  our "Audio already read" / "Processing audio" go back into recordRequested.
- PianoRollToolHandler.h, PianoRollComponent.cpp: kept our bool notifyEscapeKey
  (EQ closes first, Esc passes to the host), added upstream transportShortcutsEnabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream 5938769 removed the per-tick preference sync and the constructor
never synced, so the editor stayed in the default scheme: OpenDyne users got
the classic mode, F1-F6 went to REAPER and Read Audio made no notes.

a11y: Read Audio on already read audio with no OpenDyne notes now makes the
notes from the existing pitch and says "Notes made: N" instead of a dead end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts:
- Preferences: kept our keyboard audition toggle and accessible combo box,
  added upstream note transpose preview toggle.
- PluginProcessor: took upstream mixAuditions, our NoteAudition is mixed there
  before its ARA early return; both audition members kept.
- PluginEditor: external edit check moved to the processor upstream; "External
  edit applied" now follows a processor counter.
- RenderBadgeComponent, PianoRollComponent, AppPreferences: kept both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JUCE gives ToggleButton a read-only On/Off value, so NVDA said "read only" on
every check box, and a key press raises no toggle event, so it stayed silent.
AccessibleToggleButton has no value and raises the UIA toggle state change
on click, so the screen reader says checked / not checked in its own language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As an item FX in REAPER the editor view instance is a playback renderer and
gets no audio while stopped, so the arrows were silent. The document's realtime
editor renderer now mixes the audition, as upstream does for the drag audition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropped "Play the note after a keyboard edit": the keyboard audition now follows
upstream's note transpose preview toggle (user's request).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@YuFeng926
YuFeng926 merged commit 9fc6943 into YuFeng926:standalone Nov 16, 2026
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.

2 participants