patches: 0008 - setTitle:empty instead of setAccessibilityElement:NO
This commit is contained in:
@@ -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 <martin@sukany.cz>
|
From: Martin Sukany <martin@sukany.cz>
|
||||||
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
||||||
Subject: [PATCH 2/2] ns: announce child frame completion candidates for
|
Subject: [PATCH 2/2] ns: announce child frame completion candidates for
|
||||||
@@ -24,12 +24,8 @@ Safety:
|
|||||||
- WINDOWP, BUFFERP validation for partially initialized frames.
|
- WINDOWP, BUFFERP validation for partially initialized frames.
|
||||||
- Buffer size limit (10000 chars) skips non-completion child frames.
|
- Buffer size limit (10000 chars) skips non-completion child frames.
|
||||||
|
|
||||||
Remove the child frame window from the accessibility hierarchy via
|
Clear the child frame window title to minimize VoiceOver's automatic
|
||||||
setAccessibilityElement:NO. This prevents VoiceOver's automatic
|
window-appeared announcement.
|
||||||
"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.
|
|
||||||
|
|
||||||
Announce via AnnouncementRequested to NSApp with High priority.
|
Announce via AnnouncementRequested to NSApp with High priority.
|
||||||
Use direct UAZoomChangeFocus because the child frame renders
|
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.
|
handler for FRAME_PARENT_FRAME frames, under re-entrance guard.
|
||||||
---
|
---
|
||||||
src/nsterm.h | 1 +
|
src/nsterm.h | 1 +
|
||||||
src/nsterm.m | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
src/nsterm.m | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
2 files changed, 212 insertions(+), 1 deletion(-)
|
2 files changed, 211 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/nsterm.h b/src/nsterm.h
|
diff --git a/src/nsterm.h b/src/nsterm.h
|
||||||
index 5c15639..21b2823 100644
|
index 5c15639..21b2823 100644
|
||||||
@@ -59,7 +55,7 @@ index 5c15639..21b2823 100644
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||||
index d13c5c7..6c7e12f 100644
|
index d13c5c7..1c94c20 100644
|
||||||
--- a/src/nsterm.m
|
--- a/src/nsterm.m
|
||||||
+++ b/src/nsterm.m
|
+++ b/src/nsterm.m
|
||||||
@@ -7066,6 +7066,110 @@ ns_ax_selected_overlay_text (struct buffer *b,
|
@@ -7066,6 +7066,110 @@ ns_ax_selected_overlay_text (struct buffer *b,
|
||||||
@@ -267,7 +263,7 @@ index d13c5c7..6c7e12f 100644
|
|||||||
- (void)postAccessibilityUpdates
|
- (void)postAccessibilityUpdates
|
||||||
{
|
{
|
||||||
NSTRACE ("[EmacsView 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
|
/* Re-entrance guard: VoiceOver callbacks during notification posting
|
||||||
can trigger redisplay, which calls ns_update_end, which calls us
|
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;
|
+ Child frames don't participate in the accessibility tree;
|
||||||
+ announce the selected candidate directly.
|
+ announce the selected candidate directly.
|
||||||
+
|
+
|
||||||
+ Remove the child frame window from accessibility to prevent
|
+ Clear the window title to minimize VoiceOver's automatic
|
||||||
+ VoiceOver's automatic window-appeared announcement (which
|
+ window-appeared announcement (says "window" instead of the
|
||||||
+ blocks all other speech until finished). Our announcements
|
+ full frame name). The element stays in the accessibility
|
||||||
+ go to NSApp and are unaffected. VoiceOver focus stays on the
|
+ tree so focus tracking and Zoom continue to work. */
|
||||||
+ parent frame since it never tracked the child frame. */
|
|
||||||
+ if (FRAME_PARENT_FRAME (emacsframe))
|
+ if (FRAME_PARENT_FRAME (emacsframe))
|
||||||
+ {
|
+ {
|
||||||
+ [[self window] setAccessibilityElement:NO];
|
+ [[self window] setTitle:@""];
|
||||||
+ [self announceChildFrameCompletion];
|
+ [self announceChildFrameCompletion];
|
||||||
+ accessibilityUpdating = NO;
|
+ accessibilityUpdating = NO;
|
||||||
+ return;
|
+ return;
|
||||||
|
|||||||
Reference in New Issue
Block a user