Skip to content

Report only the text view's visible part to VoiceOver - #210

Merged
luca-chen198 merged 1 commit into
mainfrom
fix/voiceover-scroll-jump
Nov 6, 2026
Merged

luca-chen198 merged 1 commit into
mainfrom
fix/voiceover-scroll-jump

Conversation

@luca-chen198

Copy link
Copy Markdown
Member

VoiceOver moved the text about 75 pt whenever its cursor landed on it (turning VoiceOver on, a click, a document switch).

Cause (measured): VoiceOver scrolls an element taller than the viewport by writing the scroll bar's value (NSScroller accessibilitySetValueAttribute:) until the element's top sits about 35 pt under the scroll area's top. The text starts below the header band, so it scrolled the band away. AppKit converts the value correctly; the target is VoiceOver's own.

Fix: NativeTextView.accessibilityFrame() returns the frame clipped to the viewport (content insets excluded), so the element always fits and VoiceOver has nothing to scroll. Line and range bounds are unchanged.

Tested: live in Nodes with VoiceOver on (top of a long note, mid-note, after leaving and re-entering the text): no scroll bar writes, no jump. swift test --no-parallel: 615 tests pass.

🤖 Generated with Claude Code

@Nicolas-Py

Copy link
Copy Markdown
Member

@luca-chen198 feel free to test again/ merge would like to move forward here

VoiceOver scrolls an element taller than the viewport until its top sits
about 35 pt under the scroll area's top. The text starts below the header
band, so the page moved about 75 pt whenever the VoiceOver cursor landed
on the text: after turning VoiceOver on, after a click, after switching
documents. Clipping the accessibility frame to the viewport leaves
VoiceOver nothing to scroll; line and range bounds are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@luca-chen198
luca-chen198 force-pushed the fix/voiceover-scroll-jump branch from 55813e2 to 67a85ff Compare November 6, 2026 14:21
@luca-chen198
luca-chen198 merged commit 04f3dbd into main Nov 6, 2026
1 check passed
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