From e09b8c61f049b3ef7f4c06301185c7d3a8fbef44 Mon Sep 17 00:00:00 2001 From: Daneel Date: Sat, 28 Feb 2026 17:04:06 +0100 Subject: [PATCH] patches: 0008 - setTitle:empty instead of setAccessibilityElement:NO --- ...d-frame-completion-candidates-for-Vo.patch | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/patches/0008-ns-announce-child-frame-completion-candidates-for-Vo.patch b/patches/0008-ns-announce-child-frame-completion-candidates-for-Vo.patch index a63be9c..d390bca 100644 --- a/patches/0008-ns-announce-child-frame-completion-candidates-for-Vo.patch +++ b/patches/0008-ns-announce-child-frame-completion-candidates-for-Vo.patch @@ -1,4 +1,4 @@ -From 2ee64fa9664950bd15f79a720cf1b67cb41b17e2 Mon Sep 17 00:00:00 2001 +From 80da4658204a10b8df5305743806aa26eef10478 Mon Sep 17 00:00:00 2001 From: Martin Sukany Date: Sat, 28 Feb 2026 16:01:29 +0100 Subject: [PATCH 2/2] ns: announce child frame completion candidates for @@ -24,12 +24,8 @@ Safety: - WINDOWP, BUFFERP validation for partially initialized frames. - Buffer size limit (10000 chars) skips non-completion child frames. -Remove the child frame window from the accessibility hierarchy via -setAccessibilityElement:NO. This prevents VoiceOver's automatic -"X window" announcement which blocks all speech until finished. -Our candidate announcements go to NSApp (not the window element) -and are unaffected. VoiceOver focus stays on the parent frame -since it never tracked the hidden child frame. +Clear the child frame window title to minimize VoiceOver's automatic +window-appeared announcement. Announce via AnnouncementRequested to NSApp with High priority. Use direct UAZoomChangeFocus because the child frame renders @@ -43,8 +39,8 @@ draw_window_cursor, so the last Zoom call wins. handler for FRAME_PARENT_FRAME frames, under re-entrance guard. --- src/nsterm.h | 1 + - src/nsterm.m | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 212 insertions(+), 1 deletion(-) + src/nsterm.m | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 211 insertions(+), 1 deletion(-) diff --git a/src/nsterm.h b/src/nsterm.h index 5c15639..21b2823 100644 @@ -59,7 +55,7 @@ index 5c15639..21b2823 100644 @end diff --git a/src/nsterm.m b/src/nsterm.m -index d13c5c7..6c7e12f 100644 +index d13c5c7..1c94c20 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7066,6 +7066,110 @@ ns_ax_selected_overlay_text (struct buffer *b, @@ -267,7 +263,7 @@ index d13c5c7..6c7e12f 100644 - (void)postAccessibilityUpdates { NSTRACE ("[EmacsView postAccessibilityUpdates]"); -@@ -12309,11 +12500,30 @@ ns_ax_collect_windows (Lisp_Object window, EmacsView *view, +@@ -12309,11 +12500,29 @@ ns_ax_collect_windows (Lisp_Object window, EmacsView *view, /* Re-entrance guard: VoiceOver callbacks during notification posting can trigger redisplay, which calls ns_update_end, which calls us @@ -283,14 +279,13 @@ index d13c5c7..6c7e12f 100644 + Child frames don't participate in the accessibility tree; + announce the selected candidate directly. + -+ Remove the child frame window from accessibility to prevent -+ VoiceOver's automatic window-appeared announcement (which -+ blocks all other speech until finished). Our announcements -+ go to NSApp and are unaffected. VoiceOver focus stays on the -+ parent frame since it never tracked the child frame. */ ++ Clear the window title to minimize VoiceOver's automatic ++ window-appeared announcement (says "window" instead of the ++ full frame name). The element stays in the accessibility ++ tree so focus tracking and Zoom continue to work. */ + if (FRAME_PARENT_FRAME (emacsframe)) + { -+ [[self window] setAccessibilityElement:NO]; ++ [[self window] setTitle:@""]; + [self announceChildFrameCompletion]; + accessibilityUpdating = NO; + return;