patches: review fixes — eassert, blank lines, Texinfo doc
- nsterm.m: Remove 2 stray blank lines at start of ns_ax_event_is_line_nav_key body - nsterm.m: Add eassert([NSThread isMainThread]) to ensureTextCache for explicit main-thread contract enforcement - New 0002 patch: Texinfo section in doc/emacs/macos.texi documenting VoiceOver accessibility, Zoom tracking, completion announcements - README.txt: Updated file listing and patch index
This commit is contained in:
@@ -786,12 +786,12 @@ index 932d209f..ea2de6f2 100644
|
||||
+static bool
|
||||
+ns_ax_event_is_line_nav_key (int *which)
|
||||
+{
|
||||
|
||||
-
|
||||
-#ifdef NS_IMPL_COCOA
|
||||
- if (!canceled)
|
||||
- font_panel_result = nil;
|
||||
-#endif
|
||||
|
||||
-
|
||||
- result = font_panel_result;
|
||||
- font_panel_result = nil;
|
||||
+ /* 1. Check Vthis_command for known navigation command symbols.
|
||||
@@ -1431,6 +1431,7 @@ index 932d209f..ea2de6f2 100644
|
||||
+ below are therefore safe without @synchronized — only the
|
||||
+ write section at the end needs synchronization to protect
|
||||
+ against concurrent reads from AX server thread. */
|
||||
+ eassert ([NSThread isMainThread]);
|
||||
+ struct window *w = [self validWindow];
|
||||
+ if (!w || !WINDOW_LEAF_P (w))
|
||||
+ return;
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Fri, 27 Feb 2026 17:30:00 +0100
|
||||
Subject: [PATCH 2/2] doc: add VoiceOver accessibility section to macOS
|
||||
appendix
|
||||
|
||||
Document the new VoiceOver accessibility support in the Emacs manual.
|
||||
Add a new section to the macOS appendix covering screen reader usage,
|
||||
keyboard navigation feedback, completion announcements, and Zoom
|
||||
cursor tracking.
|
||||
|
||||
* doc/emacs/macos.texi (VoiceOver Accessibility): New section.
|
||||
---
|
||||
doc/emacs/macos.texi | 46 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
||||
index 1234567..abcdefg 100644
|
||||
--- a/doc/emacs/macos.texi
|
||||
+++ b/doc/emacs/macos.texi
|
||||
@@ -31,6 +31,7 @@ Support}), but we hope to improve it in the future.
|
||||
* Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or macOS.
|
||||
* Mac / GNUstep Customization:: Customizations under GNUstep or macOS.
|
||||
* Mac / GNUstep Events:: How window system events are handled.
|
||||
+* VoiceOver Accessibility:: Screen reader support on macOS.
|
||||
* GNUstep Support:: Details on status of GNUstep support.
|
||||
@end menu
|
||||
|
||||
@@ -272,6 +273,51 @@ services and receive the results back. Note that you may need to
|
||||
restart Emacs to access newly-available services.
|
||||
|
||||
|
||||
+@node VoiceOver Accessibility
|
||||
+@section VoiceOver Accessibility (macOS)
|
||||
+@cindex VoiceOver
|
||||
+@cindex accessibility (macOS)
|
||||
+@cindex screen reader (macOS)
|
||||
+
|
||||
+ When built with the Cocoa interface on macOS, Emacs exposes buffer
|
||||
+content, cursor position, mode lines, and interactive elements to the
|
||||
+macOS accessibility subsystem. This enables use with VoiceOver,
|
||||
+Apple's built-in screen reader, and with other assistive technology
|
||||
+such as macOS Zoom.
|
||||
+
|
||||
+ Toggle VoiceOver with @kbd{Cmd-F5} (or via System Settings,
|
||||
+Accessibility, VoiceOver). When Emacs is focused, VoiceOver announces
|
||||
+the buffer name and current line. Standard Emacs navigation produces
|
||||
+speech feedback:
|
||||
+
|
||||
+@itemize @bullet
|
||||
+@item
|
||||
+Arrow keys read individual characters (left/right) or full lines
|
||||
+(up/down).
|
||||
+@item
|
||||
+@kbd{M-f} and @kbd{M-b} announce words.
|
||||
+@item
|
||||
+@kbd{C-n} and @kbd{C-p} read the destination line.
|
||||
+@item
|
||||
+Shift-modified movement announces selected or deselected text.
|
||||
+@item
|
||||
+@key{TAB} and @kbd{S-@key{TAB}} navigate interactive elements
|
||||
+(buttons, links, completion candidates) within a buffer.
|
||||
+@end itemize
|
||||
+
|
||||
+ The @file{*Completions*} buffer announces each completion candidate
|
||||
+as you navigate, even while keyboard focus remains in the minibuffer.
|
||||
+
|
||||
+ macOS Zoom (System Settings, Accessibility, Zoom) tracks the Emacs
|
||||
+cursor automatically when set to follow keyboard focus. The cursor
|
||||
+position is communicated via @code{UAZoomChangeFocus} and the
|
||||
+@code{AXBoundsForRange} accessibility attribute.
|
||||
+
|
||||
+ This support is available only on the Cocoa build; GNUstep has a
|
||||
+different accessibility model and is not yet supported
|
||||
+(@pxref{GNUstep Support}). Evil-mode block cursors are handled
|
||||
+correctly: character navigation announces the character at the cursor
|
||||
+position, not the character before it.
|
||||
+
|
||||
@node GNUstep Support
|
||||
@section GNUstep Support
|
||||
|
||||
--
|
||||
2.43.0
|
||||
@@ -1,9 +1,12 @@
|
||||
EMACS NS VOICEOVER ACCESSIBILITY PATCH
|
||||
========================================
|
||||
patch: 0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch
|
||||
0002-doc-add-VoiceOver-accessibility-section-to-macOS-app.patch
|
||||
author: Martin Sukany <martin@sukany.cz>
|
||||
files: src/nsterm.h (+105 lines)
|
||||
src/nsterm.m (+2844 ins, -149 del, +2695 net)
|
||||
src/nsterm.m (+2846 ins, -151 del, +2695 net)
|
||||
doc/emacs/macos.texi (+46 lines)
|
||||
etc/NEWS (+11 lines)
|
||||
|
||||
|
||||
OVERVIEW
|
||||
|
||||
Reference in New Issue
Block a user