From b83a0613223e1341c3a2996b7a175172a639fad3 Mon Sep 17 00:00:00 2001 From: Daneel Date: Fri, 27 Feb 2026 17:15:18 +0100 Subject: [PATCH] =?UTF-8?q?patches:=20review=20fixes=20=E2=80=94=20eassert?= =?UTF-8?q?,=20blank=20lines,=20Texinfo=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- ...oundsForRange-for-macOS-Zoom-cursor-.patch | 5 +- ...r-accessibility-section-to-macOS-app.patch | 83 +++++++++++++++++++ patches/README.txt | 5 +- 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 patches/0002-doc-add-VoiceOver-accessibility-section-to-macOS-app.patch diff --git a/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch b/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch index 0b81d9f..9c6fe19 100644 --- a/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch +++ b/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch @@ -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; diff --git a/patches/0002-doc-add-VoiceOver-accessibility-section-to-macOS-app.patch b/patches/0002-doc-add-VoiceOver-accessibility-section-to-macOS-app.patch new file mode 100644 index 0000000..66d6003 --- /dev/null +++ b/patches/0002-doc-add-VoiceOver-accessibility-section-to-macOS-app.patch @@ -0,0 +1,83 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Sukany +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 diff --git a/patches/README.txt b/patches/README.txt index f5f8319..ec1ec01 100644 --- a/patches/README.txt +++ b/patches/README.txt @@ -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 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